Search code examples
node.jsreactjsnpmstorybook

Error: error:0308010C:digital envelope routines::unsupported when trying npm run storybook


when i try npm run storybook

I am getting following error in terminal

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:71:19)
    at Object.createHash (node:crypto:133:10)

OS - Mac Pro M1

my story book script as follows

"storybook" : "start-storybook -p 6006 -s public"

react application staring without any issues, but story book not working

Normally this type of issue i am solving with

--openssl-legacy-provider

but when i try this solution for above case

error: unknown option '--openssl-legacy-provider'

getting this error


Solution

  • I forgot to install "webpack": "^5.75.0" as development dependency. After installing webpack storybook working fine