upnotes-io / react-todo

A generic todo list componet for react. This is being used in an electron based app: https://upnotes.io
8 stars 41 forks source link

Cannot run storybook #61

Closed Curis-lab closed 2 months ago

Curis-lab commented 7 months ago

Error on yarn run storybook

System Environment

Description Can not run on a terminal or Zsh

Steps to Reproduce

  1. First clone repos, It's perfectly fine

  2. When I run yarn install

    
    [1/4] 🔍  Resolving packages...
    [2/4] 🚚  Fetching packages...
    [3/4] 🔗  Linking dependencies...
    warning " > @mui/material@5.12.3" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning " > @mui/material@5.12.3" has incorrect peer dependency "react-dom@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/base@5.0.0-alpha.128" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/base@5.0.0-alpha.128" has incorrect peer dependency "react-dom@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/system@5.12.3" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/utils@5.12.3" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/system > @mui/private-theming@5.12.3" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning "@mui/material > @mui/system > @mui/styled-engine@5.12.3" has incorrect peer dependency "react@^17.0.0 || ^18.0.0".
    warning " > babel-loader@8.2.5" has unmet peer dependency "webpack@>=2".
    warning " > @storybook/react@6.5.13" has unmet peer dependency "require-from-string@^2.0.2".
    warning " > framer-motion@7.6.1" has incorrect peer dependency "react@^18.0.0".
    warning " > framer-motion@7.6.1" has incorrect peer dependency "react-dom@^18.0.0".
    [4/4] 🔨  Building fresh packages...
    $ husky install
    husky - Git hooks installed
    ✨  Done in 12.10s.```
  3. After that, yarn run storybook

    yarn run v1.22.19
    $ start-storybook -p 6006
    info @storybook/react v6.5.13
    info
    info => Loading presets
    
    attention => Storybook now collects completely anonymous telemetry regarding usage.
    This information is used to shape Storybook's roadmap and prioritize features.
    You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
    https://storybook.js.org/telemetry
    
    info Addon-docs: using MDX1
    info => Using implicit CSS loaders
    (node:21123) DeprecationWarning: Default PostCSS plugins are deprecated. When switching to '@storybook/addon-postcss',
    you will need to add your own plugins, such as 'postcss-flexbugs-fixes' and 'autoprefixer'.
    
    See https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#deprecated-default-postcss-plugins for details.
    (Use `node --trace-deprecation ...` to show where the warning was created)
    info => Using default Webpack4 setup
    10% building 1/1 modules 0 active
    info => Ignoring cached manager due to change in manager config
    10% building 1/7 modules 6 active /Users/nyanlin/github/react-todo/node_modules/@storybook/addon-backgrounds/preview.js-generated-config-entry.jsnode: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 (/Users/nyanlin/github/react-todo/node_modules/webpack/lib/util/createHash.js:135:53)
        at NormalModule._initBuildHash (/Users/nyanlin/github/react-todo/node_modules/webpack/lib/NormalModule.js:417:16)
        at handleParseError (/Users/nyanlin/github/react-todo/node_modules/webpack/lib/NormalModule.js:471:10)
        at /Users/nyanlin/github/react-todo/node_modules/webpack/lib/NormalModule.js:503:5
        at /Users/nyanlin/github/react-todo/node_modules/webpack/lib/NormalModule.js:358:12
        at /Users/nyanlin/github/react-todo/node_modules/loader-runner/lib/LoaderRunner.js:373:3
        at iterateNormalLoaders (/Users/nyanlin/github/react-todo/node_modules/loader-runner/lib/LoaderRunner.js:214:10)
        at /Users/nyanlin/github/react-todo/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'
    }
    
    Node.js v18.6.0
    error Command failed with exit code 1.
    info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
syedhassanabbas12 commented 7 months ago

Seems like the same issue as: https://github.com/storybookjs/storybook/issues/16555

Curis-lab commented 2 months ago

I have found completed