question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Builder error with storybook 6.5.9

See original GitHub issue

What version of vite are you using?

6.5.9

System info and storybook versions

System: OS: Windows 10 10.0.19044 CPU: (12) x64 Intel® Core™ i7-10750H CPU @ 2.60GHz Binaries: Node: 18.4.0 - ~\scoop\persist\nvm\nodejs\nodejs\node.EXE npm: 8.12.1 - ~\scoop\persist\nvm\nodejs\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (102.0.1245.44) npmPackages: @storybook/addon-a11y: ^6.5.9 => 6.5.9 @storybook/addon-actions: ^6.5.9 => 6.5.9 @storybook/addon-essentials: ^6.5.9 => 6.5.9 @storybook/addon-links: ^6.5.9 => 6.5.9 @storybook/addon-notes: ^5.3.21 => 5.3.21 @storybook/addon-postcss: ^2.0.0 => 2.0.0 @storybook/addons: ^6.5.9 => 6.5.9 @storybook/builder-vite: ^0.1.36 => 0.1.36 @storybook/builder-webpack5: ^6.5.9 => 6.5.9 @storybook/csf-tools: ^6.5.9 => 6.5.9 @storybook/manager-webpack5: ^6.5.9 => 6.5.9 @storybook/theming: ^6.5.9 => 6.5.9 @storybook/vue3: ^6.5.9 => 6.5.9

Describe the Bug

When switching my working project from webpack5 to vite I get this error

info @storybook/vue3 v6.5.9 storybook C:\Projects\euronet\web\mono\vue\packages\portal
info                       ger-cache
info => Loading presets
info => Serving static files from ./.\public at /
info => Loading custom manager config

info => Cleared cached manager config
i 「wdm」: wait until bundle finished: 
node:internal/crypto/hash:67
  this[kHandle] = new _Hash(algorithm, xofLen);
                  ^

Error: error:0308010C:digital envelope routines::unsupported
    at new Hash (node:internal/crypto/hash:67:19)
    at Object.createHash (node:crypto:133:10)
    at module.exports (C:\Projects\euronet\web\mono\vue\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\util\createHash.js:135:53)
    at NormalModule._initBuildHash (C:\Projects\euronet\web\mono\vue\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:417:16)      
    at handleParseError (C:\Projects\euronet\web\mono\vue\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:471:10)
    at C:\Projects\euronet\web\mono\vue\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:503:5
    at C:\Projects\euronet\web\mono\vue\node_modules\.pnpm\webpack@4.46.0\node_modules\webpack\lib\NormalModule.js:358:12
    at C:\Projects\euronet\web\mono\vue\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:373:3
    at iterateNormalLoaders (C:\Projects\euronet\web\mono\vue\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:214:10)  
    at iterateNormalLoaders (C:\Projects\euronet\web\mono\vue\node_modules\.pnpm\loader-runner@2.4.0\node_modules\loader-runner\lib\LoaderRunner.js:221:10) {
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

Node.js v18.4.0
 ELIFECYCLE  Command failed with exit code 1.

image

main.js

module.exports = {
  core: {
    builder: '@storybook/builder-vite',
  },
  stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
}

Link to Minimal Reproducible Example

No response

Participation

  • I am willing to submit a pull request for this issue.

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:6
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

7reactions
IanVScommented, Oct 21, 2022

@viveleroi if you need to use node 18, I’d recommend trying out storybook 7, which does not use webpack at all if you’re using a vite framework. You can run npx sb@next upgrade --prerelease to try out the latest v7 alpha release.

1reaction
blowsiecommented, Sep 28, 2022

@IanVS Its worth noting that in newer versions of Node (I think 18.5.0) this option --openssl-legacy-provider is no longer supported. So It seems that Vite Storybook is now stuck on older versions

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading Storybook
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and...
Read more >
@storybook/builder-webpack5 | Yarn - Package Manager
Builder implemented with webpack5 and webpack5 -compatible loaders/plugins/config, used by @storybook/core-server to build the preview iframe.
Read more >
storybook digital envelope routines::unsupported - You.com
Describe the bug When I running the cmd line ̀yarn build-storybook -c .storybook -o build/storybook` with Node 17. I received this error:.
Read more >
@storybook/builder-webpack5 - npm
Builder -Webpack5. Builder implemented with webpack5 and webpack5 -compatible loaders/plugins/config, used by @storybook/core-server to build ...
Read more >
Error running storybook after 6.5.12 install - Stack Overflow
Describe the bug After creating the react app and installing storybook 6.5.12, when attempting to run storybook, I get the below error.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found