-
-
Notifications
You must be signed in to change notification settings - Fork 27.1k
Open
Description
Describe the bug
I installed the latest Node version, currently, it's 17.2.0
. When I try to start the project in development mode with the command npm run start
, it throws an error & it's unable to start the project for development.
Pre-requisites:
- Node's version
17.2.0
. - NPM's version
8.1.41
. - OS: Window 11
- CLI:
Windows PowerShell
Steps to reproduce:
- run the command
npx create-react-app hello-world
- navigate to the project's root & run the command:
npm run start
Expected results
It was expected to compile in dev mode & launch React's app in the browser like in the screenshot below: ( which it's using Node's version 16.13.1
)
Actual results
It doesn't compile & it throws the following error instead:
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 (C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\NormalModule.js:417:16)
at handleParseError (C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\NormalModule.js:471:10)
at C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\NormalModule.js:503:5
at C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\NormalModule.js:358:12
at iterateNormalLoaders (C:\Users\manue\Desktop\projects\hello-world\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
at iterateNormalLoaders (C:\Users\manue\Desktop\projects\hello-world\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
C:\Users\manue\Desktop\projects\hello-world\node_modules\react-scripts\scripts\start.js:19
throw err;
^
Error: error:0308010C:digital envelope routines::unsupported
at Object.createHash (node:crypto:130:10)
at module.exports (C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\util\createHash.js:135:53)
at NormalModule._initBuildHash (C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\NormalModule.js:417:16)
at C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\NormalModule.js:452:10
at C:\Users\manue\Desktop\projects\hello-world\node_modules\webpack\lib\NormalModule.js:323:13
at C:\Users\manue\Desktop\projects\hello-world\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at C:\Users\manue\Desktop\projects\hello-world\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at context.callback (C:\Users\manue\Desktop\projects\hello-world\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
at C:\Users\manue\Desktop\projects\hello-world\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'
}
This is a screenshot of the issue:
Workaround
- uninstall Node's version
17.2.0
- install Node's version
16.13.1
- run
npm run start
The app should compile now.
ryanvanderpol, thiagorossener, Emekaony, rhythmshandlya, nicholasrobertson and 29 moresamithf, Hamzajoshan, duvan-molina, hellochirag and KaroMouradSallar-Khan, jacob-petterle and AliBayatpourrhythmshandlya, emiz98, ARIPRASATH4664, macyenga and fainatdevurandom, yaniket, Rao-Mudasir and binu-baiju