ealush / emoji-picker-react

The most popular React Emoji Picker
https://ealush.com/emoji-picker-react/
MIT License
1.04k stars 171 forks source link

Running storybook fails #345

Closed ErezBiren closed 10 months ago

ErezBiren commented 1 year ago

I tried to run "yarn storybook" and got this error:

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 (C:\git\emoji-picker-react\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\git\emoji-picker-react\node_modules\webpack\lib\NormalModule.js:417:16)
    at handleParseError (C:\git\emoji-picker-react\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\git\emoji-picker-react\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\git\emoji-picker-react\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\git\emoji-picker-react\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\git\emoji-picker-react\node_modules\loader-runner\lib\LoaderRunner.js:214:10)
    at C:\git\emoji-picker-react\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'
}

I had to change the package.json file storybook script

from:

"storybook": "start-storybook -p 6006",

to:

"storybook": "SET NODE_OPTIONS=--openssl-legacy-provider && start-storybook -p 6006",

Are you familiar with that issue? Is that supposed to be a permanent solution? if so, I can PR it.

shootermv commented 11 months ago

will it help for this issue - to upgrade storybook to latest v7.4.5 version?