Error message “error:0308010C:digital envelope routines::unsupported”

I’m facing this issue when I created the react project in IntelliJ

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 (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:471:10)
    at /Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:503:5
    at /Users/user/Programming Documents/WebServer/untitled/node_modules/webpack/lib/NormalModule.js:358:12
    at /Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/Users/user/Programming Documents/WebServer/untitled/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/Users/user/Programming Documents/WebServer/untitled/node_modules/react-scripts/scripts/start.js:19
  throw err;
  ^

 

There are two solutions to this Error message “error:0308010C:digital envelope routines::unsupported”

The first one is to uninstall Node.js version 17+ and install the Node version 16+

  • For uninstalling node.js using this command
    • In Mac use this command
      brew uninstall --force node
      
    • For Window systems check out this post.

 

  • Also re-install the present LTS node js version from their node site. or you can install specific downloads from here;
  • Also, you can use Node Version Manager (NVM)

 

 

The second one is open the terminal and executes these as commands :

  • For Mac OS & Linux (windows git bash)-
export NODE_OPTIONS=--openssl-legacy-provider
  • And for Windows command prompt-
set NODE_OPTIONS=--openssl-legacy-provider

 

For more info check out this link.

 

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *