"Error: error:0308010C:digital envelope routines::unsupported" Node version error

667 views Asked by At
Starting the development server...

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Rohit\New folder\react-blogs\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Rohit\New folder\react-blogs\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\Rohit\New folder\react-blogs\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
C:\Rohit\New folder\react-blogs\node_modules\react-scripts\scripts\start.js:19
  throw err;
  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:69:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\NormalModule.js:417:16)
    at C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\NormalModule.js:452:10
    at C:\Rohit\New folder\react-blogs\node_modules\webpack\lib\NormalModule.js:323:13
    at C:\Rohit\New folder\react-blogs\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at C:\Rohit\New folder\react-blogs\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (C:\Rohit\New folder\react-blogs\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at C:\Rohit\New folder\react-blogs\node_modules\babel-loader\lib\index.js:59:103 {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.18.1

when i made this app the node LTS version was node 16 now it 18 when I excute npm start it gives me this node version error and I also excuted npm update --force it updated all file then too same error is displayed in terminal. what is the solution for this. how can I start my reat app again

1

There are 1 answers

0
todevv On BEST ANSWER

You have two options. Downgrade the node version to 16 again or

QUICK FIX

On Unix-like (Linux, macOS, Git bash, etc.):

export NODE_OPTIONS=--openssl-legacy-provider

On Windows CMD:

set NODE_OPTIONS=--openssl-legacy-provider

On PowerShell:

$env:NODE_OPTIONS = "--openssl-legacy-provider"