Hello Guys, How are you all? Hope You all Are Fine. Today I just updated my node to latest version. But As I updated to latest version my Project give me following error while building Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported in node. 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 Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported Error Occurs ?
- How To Solve Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported Error ?
- Solution 1: downgrade node to
v14.18.1
- Solution 2: add NODE_OPTIONS
- Solution 3: Change start line in package.json
- Solution 4: Use LTS version
- Summary
How Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported Error Occurs ?
I just updated my node to latest version. But As I updated to latest version my Project give me following error while building.
Failed to construct transformer: Error: error:0308010C: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 Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported Error ?
How To Solve Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported Error ?
To Solve Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported Error Simplest and easiest solution is Just downgrade node to
v14.18.1
. And then Just deletenode_modules
and then try to rebuild your project and your error must be solved.Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported
To Solve Failed to construct transformer: Error: error:0308010C:digital envelope routines::unsupported Error Simplest and easiest solution is Just downgrade node to
v14.18.1
. And then Just deletenode_modules
and then try to rebuild your project and your error must be solved.
Solution 1: downgrade node to v14.18.1
Simplest and easiest solution is Just downgrade node to v14.18.1
. And then Just delete node_modules
and then try to rebuild your project and your error must be solved.
Solution 2: add NODE_OPTIONS
You Just need to run this command in your terminal. For windows use gitbash terminal.
export NODE_OPTIONS=--openssl-legacy-provider
OR For Windows Run this command
set NODE_OPTIONS=--openssl-legacy-provider
Now, your error must be solved.
Solution 3: Change start line in package.json
You just need to change this line in your package.json.
"start": "react-scripts start"
to
"start": "react-scripts --openssl-legacy-provider start"
Now, your error must be solved.
Solution 4: Use LTS version
You just need to use LTS version of node. If You are using different version then LTS version then you might face this error. Just check LTS version at Here.
- Install nvm (if not installed, follow Install Node.js Locally with Node Version Manager (nvm))
nvm install 16.13.0
(put your required version here)
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
- error: TypeError: Cannot read properties of undefined (reading ‘transformFile’)
Hi guys,
I sugest another solution for lastests node.js versions:
Set a environment variable “NODE_OPTIONS” with value “–openssl-legacy-provider”
Command in powershell:
$Env:NODE_OPTIONS = “–openssl-legacy-provider”
Regards,
Luis
Thank You Luis For Valuable Your Solution.
Saved me hours or re work – Thanks – AWESOME