Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running npm start results in the error 'ERR_OSSL_EVP_UNSUPPORTED' in Node >= 16 #121

Closed
aljones15 opened this issue Feb 16, 2023 · 2 comments

Comments

@aljones15
Copy link

The error:

2023-02-16T16:14:28.070Z - critical: [bedrock/worker] uncaught error workerPid=99813, workerId=dfe5ff4c3bc0f0f0, details={
  "error": {
    "message": "error:0308010C:digital envelope routines::unsupported",
    "stack": "Error: error:0308010C:digital envelope routines::unsupported\n    at new Hash (node:internal/crypto/hash:71:19)\n    at Proxy.createHash (node:crypto:133:10)\n    at module.exports (/Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/webpack/lib/util/createHash.js:135:53)\n    at NormalModule._initBuildHash (/Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/webpack/lib/NormalModule.js:417:16)\n    at handleParseError (/Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/webpack/lib/NormalModule.js:471:10)\n    at /Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/webpack/lib/NormalModule.js:503:5\n    at /Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/webpack/lib/NormalModule.js:358:12\n    at /Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/loader-runner/lib/LoaderRunner.js:373:3\n    at iterateNormalLoaders (/Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/loader-runner/lib/LoaderRunner.js:214:10)\n    at Array.<anonymous> (/Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/loader-runner/lib/LoaderRunner.js:205:4)\n    at Storage.finished (/Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:55:16)\n    at /Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:91:9\n    at /Users/andrewjones/Programs/nodejs/veres/authn.io/node_modules/graceful-fs/graceful-fs.js:123:16\n    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"
  }
}

This can be circumvented temporarily by using this command:

NODE_OPTIONS=--openssl-legacy-provider node authn.localhost.js 

It looks like the primary reason for this error is that dependencies in this project are really out of date such as bedrock-webpack: ^4.0.0. Webpack v5 no longer uses openSSL for hashing for instance.

Related issues:
https://stackoverflow.com/questions/69394632/webpack-build-failing-with-err-ossl-evp-unsupported
https://stackoverflow.com/questions/69962209/what-is-openssl-legacy-provider-in-node-js-v17
nodejs/node#40455

Of note: getting this issue in Node -v v16.19.0

@aljones15 aljones15 changed the title Running npm start results in the error 'ERR_OSSL_EVP_UNSUPPORTED' Running npm start results in the error 'ERR_OSSL_EVP_UNSUPPORTED' in Node > 16 Feb 16, 2023
@aljones15 aljones15 changed the title Running npm start results in the error 'ERR_OSSL_EVP_UNSUPPORTED' in Node > 16 Running npm start results in the error 'ERR_OSSL_EVP_UNSUPPORTED' in Node >= 16 Feb 16, 2023
@dlongley
Copy link
Contributor

In theory, this should be fixed now. Can you take a look?

@aljones15
Copy link
Author

Closing as this seems to be fixed in latest release and thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants