Home > Software design >  'npm run start' not working with older version of react
'npm run start' not working with older version of react

Time:04-28

I downloaded some react code from a Github repo and installed all dependendcies by running npm i. Then I tried to run the code in localhost by running npm run start and I get this error below:

i 「wds」: Project is running at http://192.168.0.103/
i 「wds」: webpack output is served from
i 「wds」: Content not from webpack is served from F:\framer-motion\pizzajoint\public
i 「wds」: 404s will fallback to /
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:135:10)
    at module.exports (F:\framer-motion\pizzajoint\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (F:\framer-motion\pizzajoint\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (F:\framer-motion\pizzajoint\node_modules\webpack\lib\NormalModule.js:471:10)
    at F:\framer-motion\pizzajoint\node_modules\webpack\lib\NormalModule.js:503:5
    at F:\framer-motion\pizzajoint\node_modules\webpack\lib\NormalModule.js:358:12
    at F:\framer-motion\pizzajoint\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (F:\framer-motion\pizzajoint\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at iterateNormalLoaders (F:\framer-motion\pizzajoint\node_modules\loader-runner\lib\LoaderRunner.js:221:10)
F:\framer-motion\pizzajoint\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:135:10)
    at module.exports (F:\framer-motion\pizzajoint\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (F:\framer-motion\pizzajoint\node_modules\webpack\lib\NormalModule.js:417:16)
    at F:\framer-motion\pizzajoint\node_modules\webpack\lib\NormalModule.js:452:10
    at F:\framer-motion\pizzajoint\node_modules\webpack\lib\NormalModule.js:323:13
    at F:\framer-motion\pizzajoint\node_modules\loader-runner\lib\LoaderRunner.js:367:11
    at F:\framer-motion\pizzajoint\node_modules\loader-runner\lib\LoaderRunner.js:233:18
    at context.callback (F:\framer-motion\pizzajoint\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
    at F:\framer-motion\pizzajoint\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.5.0

What could be the possible fix?

CodePudding user response:

To start a react project you have to use npm start. Not npm run start.

With npm start, your project will start running on http://localhost:3000/

Hope this works.

CodePudding user response:

check package.json for any missing dependancy then use npm install and then npm start. Or check which command is mentioned in package.json to run the app

  • Related