basically this type of error happen from node runtime not from react js.
.
dont worry i will tell you why its happen.
at this time i am working with node js v17 which not LTS and this version is not compatible with some of webpack, and my previous Node version was v16 which is LTS. in here everything is okey. there is no any error.
If you use the current LTS version of Node.js then this error will not come.
but
.
to solve this i will not recommend you, to uninstall Node.js version 17+ and reinstall the Node.js version 16+. (This is most common solution but not exact)
but
if you wish you can do this.
.
so, what is the actual solution for
Error message error 0308010C digital envelope routines unsupported
in node v17.
trust me this is every simple and magical. please see below what it should be.
Go to In your package.json: and change this line
"start": "react-scripts start"
to
"start": "react-scripts --openssl-legacy-provider start"
you can see my screen shot, its not more than those previous 2 line.
Thank you
Happy Coding
.
osman forhad
Full-Stack Developerđź’» (Mobile App & Web App)
developer.osmanforhad@gmail.com
Top comments (9)
Hi. I use Node 18.0.0 and same error appeared. But I can't fix that error with your solution.
post your error screen shot please
Same for me! I have the exact same error, even downgraded to Node v16.15.0 (the latest LTS). But if I change the script I get "Bad option" and the process ends.
Great solution. I am using Node 18.12 which is LTS but react app was not starting. Your solution fixed the issue.
Thank you so much!!!
Welcome
This solved the issue.
Thank you!
Welcome
Please refer to this article to resolve this issue. digital envelope routines unsupported