DEV Community

Cover image for React js Error message error 0308010C digital envelope routines unsupported(Solution)
Osman Forhad
Osman Forhad

Posted on • Edited on

React js Error message error 0308010C digital envelope routines unsupported(Solution)

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.

Image description

Thank you
Happy Coding
.
osman forhad
Full-Stack DeveloperšŸ’» (Mobile App & Web App)
developer.osmanforhad@gmail.com

Top comments (9)

Collapse
Ā 
devlancer412 profile image
Joseph Anderson •

Hi. I use Node 18.0.0 and same error appeared. But I can't fix that error with your solution.

Collapse
Ā 
osmanforhad profile image
Osman Forhad •

post your error screen shot please

Collapse
Ā 
adrianbenavente profile image
Adrian Benavente • • Edited

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.

img

Collapse
Ā 
lucky6400 profile image
Lucky Jain •

Great solution. I am using Node 18.12 which is LTS but react app was not starting. Your solution fixed the issue.

Collapse
Ā 
emirbektas profile image
Emir •

Thank you so much!!!

Collapse
Ā 
osmanforhad profile image
Osman Forhad •

Welcome

Collapse
Ā 
asselmankarel profile image
Karel Asselman •

This solved the issue.
Thank you!

Collapse
Ā 
osmanforhad profile image
Osman Forhad •

Welcome

Collapse
Ā 
sandeep_yadav profile image
Sandeep Yadav •

Please refer to this article to resolve this issue. digital envelope routines unsupported