React Router Lessons - I get Errors when I "npm start"

Hi!
This is what I’m working on right now: React Router

I have done like the video lesson and followed the updated information about react dom v5 but I get Errors when I try to move on :woman_shrugging:

Am I doing something wrong here?

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 (C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\util\createHash.js:135:53)    
    at NormalModule._initBuildHash (C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\NormalModule.js:471:10)     
    at C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\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 (C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\util\createHash.js:135:53)    
    at NormalModule._initBuildHash (C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\NormalModule.js:417:16)
    at C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\NormalModule.js:452:10
    at C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\webpack\lib\NormalModule.js:323:13
    at C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at C:\Projects\codecademy\react-router-lesson-starter-1\react-router-lesson-starter\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'
}

Hello!

What version of NodeJS are you using? You can check this by running node --version in a terminal.

1 Like

Hi!
Sorry that I missed your comment!
I just solved it by uninstall the newest version of node and instead installed the LTS version :grinning:

For anyone not wishing to rollback to a previous node version:

In your package.json: change this line

"start": "react-scripts start"

to

"start": "react-scripts --openssl-legacy-provider start"

NOTE: This will introduce security issues. Only do this for the purpose of continuing with this exercise