SamClayton / coriolis

Coriolis Shipyard for Elite Dangerous
https://coriolis.io
Other
0 stars 0 forks source link

Address ERR_OSSL_EVP_UNSUPPORTED startup error #25

Closed SamClayton closed 1 year ago

SamClayton commented 1 year ago

ENV NODE_OPTIONS=--openssl-legacy-provider in the Dockerfile will work around this, but that prevents VSCode from attaching to the container.

`> coriolis_shipyard@3.0.0 start

node devServer.js ℹ 「wds」: Project is running at http://localhost:3300/ ℹ 「wds」: webpack output is served from / ℹ 「wds」: Content not from webpack is served from /app ℹ 「wds」: 404s will fallback to /index.html Listening at localhost:3300 Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at module.exports (/app/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/app/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/app/node_modules/webpack/lib/NormalModule.js:471:10) at /app/node_modules/webpack/lib/NormalModule.js:503:5 at /app/node_modules/webpack/lib/NormalModule.js:358:12 at /app/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:221:10) at /app/node_modules/loader-runner/lib/LoaderRunner.js:236:3 at runSyncOrAsync (/app/node_modules/loader-runner/lib/LoaderRunner.js:130:11) at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:232:2) at Array. (/app/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 node:internal/crypto/hash:71 this[kHandle] = new _Hash(algorithm, xofLen); ^ Error: error:0308010C:digital envelope routines::unsupported at new Hash (node:internal/crypto/hash:71:19) at Object.createHash (node:crypto:133:10) at module.exports (/app/node_modules/webpack/lib/util/createHash.js:135:53) at NormalModule._initBuildHash (/app/node_modules/webpack/lib/NormalModule.js:417:16) at handleParseError (/app/node_modules/webpack/lib/NormalModule.js:471:10) at /app/node_modules/webpack/lib/NormalModule.js:503:5 at /app/node_modules/webpack/lib/NormalModule.js:358:12 at /app/node_modules/loader-runner/lib/LoaderRunner.js:373:3 at iterateNormalLoaders (/app/node_modules/loader-runner/lib/LoaderRunner.js:214:10) at Array. (/app/node_modules/loader-runner/lib/LoaderRunner.js:205:4) at Storage.finished (/app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16) at /app/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9 at /app/node_modules/graceful-fs/graceful-fs.js:123:16 at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:68:3) { opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ], library: 'digital envelope routines', reason: 'unsupported', code: 'ERR_OSSL_EVP_UNSUPPORTED' } Node.js v18.14.0`

SamClayton commented 1 year ago

According to this and other sources, a fix has been added to webpack 5 and 6, but won't be backported to 4. The cleanest solution is likely to upgrade webpack which, like many other dependencies, is very outdated at this point.

SamClayton commented 1 year ago

Fixed as part of today's merge.