relayjs / relay-examples

A collection of sample Relay applications
MIT License
1.14k stars 433 forks source link

Unable to run on Node LTS 20.11.0 #322

Open steinybot opened 9 months ago

steinybot commented 9 months ago

Steps to reproduce:

cd todo
yarn
yarn start

Fails with:

jason@goodness> yarn start                                                                                                                       ~/src/relay-examples/todo
yarn run v1.22.19
$ babel-node ./server.js
Browserslist: caniuse-lite is outdated. Please run:
npx browserslist@latest --update-db

Why you should do it regularly:
https://github.com/browserslist/browserslist#browsers-data-updating
ℹ 「wds」: Project is running at http://localhost:3000/
ℹ 「wds」: webpack output is served from /js/
ℹ 「wds」: Content not from webpack is served from /public/
node:internal/crypto/hash:68
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:68:19)
    at Object.createHash (node:crypto:138:10)
    at module.exports (/Users/jason/src/relay-examples/todo/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/jason/src/relay-examples/todo/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/jason/src/relay-examples/todo/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/jason/src/relay-examples/todo/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/jason/src/relay-examples/todo/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/jason/src/relay-examples/todo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/jason/src/relay-examples/todo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at Array.<anonymous> (/Users/jason/src/relay-examples/todo/node_modules/loader-runner/lib/LoaderRunner.js:205:4) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v20.11.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
rbalicki2 commented 9 months ago

I see this on

node --version
v18.19.0

FWIW

nvm use 16 fixed my issue

steinybot commented 9 months ago

It's a case of running yarn update webpack. I'm just testing the other examples.

steinybot commented 9 months ago

issue-tracker uses react-scripts 3.2.0 which in turn uses an old version of webpack. There is no version of react-scripts that uses webpack 4.47.0 (see https://github.com/facebook/create-react-app/issues/13513).

This will have to be updated to react-scripts 5 which uses webpack 5 (there are breaking changes).