0

I have installed storybook in my project and now when I am trying to run the storybook using npm run storybook I am getting this error. I Have searched the whole web and also updated my react-scripts, Node JS and VS Code to latest versions after reading some articles on web but the error is still not resolved.

Ignoring cached manager due to change in manager config
i 「wdm」: wait until bundle finished: 
node:internal/crypto/hash:71
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (F:\Masai\snehil_agrahari_fw21_1171\unit-5\sprint-3\day-4\you\LIVE\story-book-demo\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (F:\Masai\snehil_agrahari_fw21_1171\unit-5\sprint-3\day-4\you\LIVE\story-book-demo\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (F:\Masai\snehil_agrahari_fw21_1171\unit-5\sprint-3\day-4\you\LIVE\story-book-demo\node_modules\webpack\lib\NormalModule.js:471:10)
    at F:\Masai\snehil_agrahari_fw21_1171\unit-5\sprint-3\day-4\you\LIVE\story-book-demo\node_modules\webpack\lib\NormalModule.js:503:5
    at F:\Masai\snehil_agrahari_fw21_1171\unit-5\sprint-3\day-4\you\LIVE\story-book-demo\node_modules\webpack\lib\NormalModule.js:358:12
    at F:\Masai\snehil_agrahari_fw21_1171\unit-5\sprint-3\day-4\you\LIVE\story-book-demo\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (F:\Masai\snehil_agrahari_fw21_1171\unit-5\sprint-3\day-4\you\LIVE\story-book-demo\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at Array.<anonymous> (F:\Masai\snehil_agrahari_fw21_1171\unit-5\sprint-3\day-4\you\LIVE\story-book-demo\node_modules\loader-runner\lib\LoaderRunner.js:205:4) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Can you please mention how to fix this error

Snehil Agrahari
  • 307
  • 1
  • 15
  • Does this answer your question? [Error message "error:0308010C:digital envelope routines::unsupported"](https://stackoverflow.com/questions/69692842/error-message-error0308010cdigital-envelope-routinesunsupported) – Sergey Sosunov Jan 06 '23 at 17:02
  • 1
    Related [github](https://github.com/webpack/webpack/issues/14532) issue. Shortly - you need to either `downgrade` your nodejs, either to modify package.json scripts section (as per the `accepted answer` to the question I sent in previous comment). – Sergey Sosunov Jan 06 '23 at 17:05
  • No, I have already tried using latest versions of Node and React. my node is 18+ which is LTS and react is 18.2.0 – Snehil Agrahari Jan 06 '23 at 17:06
  • I also tried with prior LTS version like 16+ but it still gives me the same error. – Snehil Agrahari Jan 06 '23 at 17:07
  • OK. let me try with node 17 – Snehil Agrahari Jan 06 '23 at 17:08
  • I'd recommend to try [this](https://stackoverflow.com/a/69713899/5767872) approach. If neither works - please, update your question with the details you listed in comments, due to they will be deleted at some point – Sergey Sosunov Jan 06 '23 at 17:10
  • "I also tried with prior LTS version like 16+" pretty strange, that had to fix your issue, please, ensure checking node --version before trying to run your scripts just in case. UPD Also check [How to set Storybook to run with different node version?](https://stackoverflow.com/questions/71765316/how-to-set-storybook-to-run-with-different-node-version) please. – Sergey Sosunov Jan 06 '23 at 17:12
  • Ok.. Trying this out too. – Snehil Agrahari Jan 07 '23 at 06:09

0 Answers0