Web currently does not build with node v19 due to dependency hell
zneix opened this issue · 0 comments
zneix commented
I've tested this with Leppunen and Mm2PL and seems like either building with either...
NODE_OPTIONS=--openssl-legacy-provider make web
- updating all dependencies with
ncu -u && make web
... does the job and succeeds (although with some typescript version warnings in the first and sourcemaps ones in the latter).
I decided to open the issue because I'm afraid of pushing a PR with all dep updates, since it could introduce some breaking change(s) and I don't have time to test that while I'm not as familiar with the project.
Logs of broken build
zneix@*** /o/justlog (main)> make
swagger generate spec -m -o ./web/public/swagger.json -w api
cd web && yarn install
yarn install v1.22.19
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @testing-library/user-event@13.5.0" has unmet peer dependency "@testing-library/dom@>=7.21.4".
warning " > styled-components@5.3.6" has unmet peer dependency "react-is@>= 16.8.0".
[4/4] Building fresh packages...
Done in 90.61s.
cd web && yarn build
yarn run v1.22.19
$ react-scripts build
Creating an optimized production build...
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at module.exports (/opt/justlog/web/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/opt/justlog/web/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/opt/justlog/web/node_modules/webpack/lib/NormalModule.js:471:10)
at /opt/justlog/web/node_modules/webpack/lib/NormalModule.js:503:5
at /opt/justlog/web/node_modules/webpack/lib/NormalModule.js:358:12
at /opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
at /opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:236:3
at runSyncOrAsync (/opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:130:11)
at iterateNormalLoaders (/opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:232:2)
at Array.<anonymous> (/opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:205:4)
at Storage.finished (/opt/justlog/web/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)
at /opt/justlog/web/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9
/opt/justlog/web/node_modules/react-scripts/scripts/build.js:19
throw err;
^
Error: error:0308010C:digital envelope routines::unsupported
at new Hash (node:internal/crypto/hash:71:19)
at Object.createHash (node:crypto:140:10)
at module.exports (/opt/justlog/web/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/opt/justlog/web/node_modules/webpack/lib/NormalModule.js:417:16)
at /opt/justlog/web/node_modules/webpack/lib/NormalModule.js:452:10
at /opt/justlog/web/node_modules/webpack/lib/NormalModule.js:323:13
at /opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/opt/justlog/web/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /opt/justlog/web/node_modules/react-scripts/node_modules/babel-loader/lib/index.js:59:103 {
opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
library: 'digital envelope routines',
reason: 'unsupported',
code: 'ERR_OSSL_EVP_UNSUPPORTED'
}
Node.js v19.1.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
make: *** [Makefile:13: web] Error 1