Hello Guys, How are you all? Hope You all Are Fine. Today I just updated node to latest version and I am facing following error opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ] in nodejs. So Here I am Explain to you all the possible solutions here.
Without wasting your time, Let’s start This Article to Solve This Error.
How this Error Occurs ?
I just updated node to latest version and I am facing following error.
Error: digital envelope routines::unsupported
opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ],
library: ‘digital envelope routines’,
reason: ‘unsupported’,
code: ‘ERR_OSSL_EVP_UNSUPPORTED’
How To Solve opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ] Error ?
- How To Solve opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ] Error ?
To Solve opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ] Error If you hit an
ERR_OSSL_EVP_UNSUPPORTED
error in your application with Node.js 17, it’s likely that your application or a module you’re using is attempting to use an algorithm or key size which is no longer allowed by default with OpenSSL 3.0. A new command-line option,--openssl-legacy-provider
, has been added to revert to the legacy provider as a temporary workaround for these tightened restrictions. Just run this command in Your terminal. node –openssl-legacy-provider ./node_modules/.bin/gatsby build Now your error must be solved. - opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ]
To Solve opensslErrorStack: [ ‘error:03000086:digital envelope routines::initialization error’ ] Error If you hit an
ERR_OSSL_EVP_UNSUPPORTED
error in your application with Node.js 17, it’s likely that your application or a module you’re using is attempting to use an algorithm or key size which is no longer allowed by default with OpenSSL 3.0. A new command-line option,--openssl-legacy-provider
, has been added to revert to the legacy provider as a temporary workaround for these tightened restrictions. Just run this command in Your terminal. node –openssl-legacy-provider ./node_modules/.bin/gatsby build Now your error must be solved.
Solution 1: Just use this command
Here is official Message : If you hit an ERR_OSSL_EVP_UNSUPPORTED
error in your application with Node.js 17, it’s likely that your application or a module you’re using is attempting to use an algorithm or key size which is no longer allowed by default with OpenSSL 3.0. A new command-line option, --openssl-legacy-provider
, has been added to revert to the legacy provider as a temporary workaround for these tightened restrictions.
Just run this command in Your terminal.
node --openssl-legacy-provider ./node_modules/.bin/gatsby build
Now your error must be solved.
Solution 2: change the build
script
You should change the build script something like this in your package.json.
{
"scripts": {
"build": "export NODE_OPTIONS=--openssl-legacy-provider; gatsby build"
}
}
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- fatal: unable to access ‘https://gopkg.in/yaml.v3/’: server certificate verification failed
- Message: Trying to access array offset on value of type null
- Error: This command is not available when running the Angular CLI outside a workspace
- node: /lib64/libm.so.6: version `GLIBC_2.27′ not found (required by node)
- Solving environment: failed with initial frozen solve. Retrying with flexible solve
- pip is configured with locations that require TLS/SSL however the ssl module in Python is not available
- Can’t find Python executable “python”, you can set the PYTHON env variable
Hi there! I recently got the exact error. But Neither solution one or two worked for me – I was getting: ./node_modules/.bin/gatsby module_not_found
I solved the issue by downgrading node to the version the application was written in, a couple years ago. Honestly, if it would be in the docker container, we want have any of these errors at all .
just run “npm install” then run “npm audit –force”
sorry run this “npm audit fix –force” . i hope it will solved
Thank You shakil hossain For Your Suggestion