I am trying to run 'npm start' to begin a new React Project and it is not working. I have done this many times, but now I get the following error:
Starting the development server...
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/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/NormalModule.js:417:16)
at handleParseError (/Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/NormalModule.js:471:10)
at /Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/NormalModule.js:503:5
at /Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/NormalModule.js:358:12
at /Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/loader-runner/lib/LoaderRunner.js:373:3
at iterateNormalLoaders (/Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
at iterateNormalLoaders (/Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/loader-runner/lib/LoaderRunner.js:221:10)
/Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/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 (/Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/util/createHash.js:135:53)
at NormalModule._initBuildHash (/Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/NormalModule.js:417:16)
at /Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/NormalModule.js:452:10
at /Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/webpack/lib/NormalModule.js:323:13
at /Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/loader-runner/lib/LoaderRunner.js:367:11
at /Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/loader-runner/lib/LoaderRunner.js:233:18
at context.callback (/Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/node_modules/loader-runner/lib/LoaderRunner.js:111:13)
at /Users/EgorUlybin/Desktop/Programming/practice folder/React/routing/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 v17.2.0
EgorUlybin@MacBook-Pro routing %
In the browser, the error message that I get is: "The site can't be reached' and 'localhost refused to connect'.
Would appreciate any help that I can get!
CodePudding user response:
It's might be because of nodejs version.
Please downgrade your nodejs version from current(17) to LTS(16) version by nvm. I hope it will be work to start your react project