0
Starting the development server...

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

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (/home/akj/Desktop/Social-Media-App/client/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/akj/Desktop/Social-Media-App/client/node_modules/webpack/lib/NormalModule.js:417:16)
    at /home/akj/Desktop/Social-Media-App/client/node_modules/webpack/lib/NormalModule.js:452:10
    at /home/akj/Desktop/Social-Media-App/client/node_modules/webpack/lib/NormalModule.js:323:13
    at /home/akj/Desktop/Social-Media-App/client/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /home/akj/Desktop/Social-Media-App/client/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/home/akj/Desktop/Social-Media-App/client/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/akj/Desktop/Social-Media-App/client/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.12.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Browser-Error

I used npx create-react-app and installed few dependencies and then when I try to start the react development server. I keep geeting this error message in CLI and on browser tab

Abhinav
  • 21
  • 3
  • This is due to usage of unsafe hashes of webpack which are hard-deprecated on the recent node.js versions, please see https://stackoverflow.com/a/69713899/1384679 for a workaround. The ultimate solution is to adjust webpack config to use a safer hash function like `output.hashFunction: "sha256"` but this would require rejecting from create-react-app. – Przemysław Zalewski Jan 09 '23 at 23:45
  • You can also try workarounds from the origin repo issue thread: https://github.com/facebook/create-react-app/issues/11708#issuecomment-1024900371 – Przemysław Zalewski Jan 09 '23 at 23:48

0 Answers0