Whole MERN stack application will not start after changing MaterialUI icons

Viewed 53

After restoring to a previous version on Git my application is still failing to load. This has never happened to me, no matter what I have been able to use Git and restore to my previous versions as I like to commit often. I don't understand how I can get this error even after that. I am creating a MERN stack application, here is my error. This happened after I installed some delete icons from MaterialUI.


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 (/home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/NormalModule.js:417:16)
    at handleParseError (/home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/NormalModule.js:471:10)
    at /home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/NormalModule.js:503:5
    at /home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/NormalModule.js:358:12
    at /home/brandon/the_odin_project/bandmate/client/node_modules/loader-runner/lib/LoaderRunner.js:373:3
    at iterateNormalLoaders (/home/brandon/the_odin_project/bandmate/client/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
    at iterateNormalLoaders (/home/brandon/the_odin_project/bandmate/client/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/home/brandon/the_odin_project/bandmate/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:67:19)
    at Object.createHash (node:crypto:130:10)
    at module.exports (/home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/util/createHash.js:135:53)
    at NormalModule._initBuildHash (/home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/NormalModule.js:417:16)
    at /home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/NormalModule.js:452:10
    at /home/brandon/the_odin_project/bandmate/client/node_modules/webpack/lib/NormalModule.js:323:13
    at /home/brandon/the_odin_project/bandmate/client/node_modules/loader-runner/lib/LoaderRunner.js:367:11
    at /home/brandon/the_odin_project/bandmate/client/node_modules/loader-runner/lib/LoaderRunner.js:233:18
    at context.callback (/home/brandon/the_odin_project/bandmate/client/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
    at /home/brandon/the_odin_project/bandmate/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'
}

I have tried replacing "start": "react-scripts start" with "start": "react-scripts --openssl-legacy-provider start" and replaced "build": "react-scripts build" with "build": "react-scripts --openssl-legacy-provider build"

In my package.json as seen on here, but it does nothing. not even an error, it just forever loads the page. This is the only solution I have seen on anywhere for this error.

1 Answers

This is a problem with Node.js dropping compatibility with OpenSSL 1.1.1.

Run with the openssl-legacy-provider option, for example:

NODE_OPTIONS=--openssl-legacy-provider npm run watch

see https://github.com/nodejs/node/issues/40455

Related