Error:0308010C:digital envelope routines::unsupported in Reactjs

Dung Do Tien Apr 25 2022 207

Hello Guys, I'm a newbie in ReactJs and I try to create a project sample by using the command:

 npx create-react-app react-sample

And I try to run the project by using the command npm run start but I get an exception throw: Error error:0308010C:digital envelope routines::unsupported.

 Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (C:\Users\hulk\Desktop\projects\react-sample\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Users\hulk\Desktop\projects\react-sample\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Users\hulk\Desktop\projects\react-sample\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Users\hulk\Desktop\projects\react-sample\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Users\hulk\Desktop\projects\react-sample\node_modules\webpack\lib\NormalModule.js:358:12
    at iterateNormalLoaders (C:\Users\hulk\Desktop\projects\react-sample\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\Users\hulk\Desktop\projects\react-sample\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
C:\Users\hulk\Desktop\projects\react-sample\node_modules\react-scripts\scripts\start.js:19
  throw err;
  ^ 

Below is my environment:

  1. Node version 17.2.0.
  2. NPM's version 8.1.41.
  3. OS: Window 11
  4. Visual code

I really didn't understand, I learn and follow a video on youtube. Anyone can explain and solved help me?

Thanks in advance!

Have 2 answer(s) found.
  • A

    Astree Extranet Apr 25 2022

    I got the same error one month ago.  Not sure about the solution, you can try:

    1. Downgrade Node version to 16.3.1

     2. Run npm run start to start running your app.

    I hope it solves for you.

  • D

    Dan Danny Apr 25 2022

    Please go to In your package.json and change this line:

     "start": "react-scripts start"

    To

     "start": "react-scripts --openssl-legacy-provider start"

    It really worked for me.

Leave An Answer
* NOTE: You need Login before leave an answer

* Type maximum 2000 characters.

* All comments have to wait approved before display.

* Please polite comment and respect questions and answers of others.

Popular Tips

X Close