-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when running build-storybook with Node 17 #16555
Comments
It looks like updating storybook's webpack5 builder to webpack v5.61.0 should fix this issue for that builder. But, an update to webpack 4 isn't expected. webpack/webpack#14532 (comment) |
If webpack 4 isn't patched, perhaps the other solutions listed in this article would resolve the issue for some users: https://onlinessolution.blogspot.com/2021/11/error-error0308010cdigital-envelope.html |
I got same error with svelte kit project |
I previously ran with nodejs 17 this problem appeared, after replacing it with nodejs 16 LTS there was no problem. |
Hi, I'm using webpack |
Getting back 20 minutes later - I actually found a culprit. You were right this is fixed in the new webpack version, the problem was that the
After this, it works. However, this means the Storybook team should update the |
More users may run into this issue as node.js 16's EOL is 7 months ahead of schedule.
I'm temporarily avoiding it by enabling the node environment variable in direnv. export NODE_OPTIONS=--openssl-legacy-provider |
@rtrembecky Do you mean this here:
What version should it be according to you to remove this problem |
@ndelangen yes, I mean exactly that. As of webpack/webpack#14532 (comment), it is fixed in 5.61.0, so |
Correct me if I'm wrong, but our current version range does allow users to install a version higher, and thus a user can totally end up installing |
I'd say so as well. So user is not blocked from working around the potential issue (as I mentioned in my previous post by deleting a yarn.lock line and rerunning yarn). But I'd also say Storybook should try to minimize the amount of potential issues for users and provide the package ranges to do so. |
Right, I'll do a wide range of version bumps of dependencies in |
This fixed my problem: https://www.npmjs.com/package/@storybook/manager-webpack5 Removed |
Workaround for storybookjs/storybook#16555. The error "Error: error:0308010C:digital envelope routines::unsupported" is fixed with webpack 5, but storybook still uses webpack 4.
This issue seems to remains for with builder-vite, as I understand manager-webpack4 is still used. |
@hlehmann that's true in 6.5, but in 7.0 webpack is not used in the vite builder at all. I'd suggest trying out the new alpha version if you're having issues here. (Edited command) |
This solved the issue for me: webpack/webpack#14532 (comment) |
Adding this configuration to module.exports = {
// ...
webpackFinal: async config => {
config.output.hashFunction = 'xxhash64'
// Return the altered config
return config
}
} |
Migrating to webpack 5 did the job for me. Please note that this command is for fresh installation: |
It worked for me thanks ^^ |
* ci: dependabot auto-merge prs * chore: use node 16 to avoid storybook/webpack issues webpack/webpack#14532 storybookjs/storybook#16555 * chore: explicit node version
Annoyingly, there is currently an issue with Storybook (see: storybookjs/storybook#16555). We already have to do this in CI to make Playwright work, and it also affects Vercel deployments (and builds on Node.js 18).
Annoyingly, there is currently an issue with Storybook (see: storybookjs/storybook#16555). We already have to do this in CI to make Playwright work, and it also affects Vercel deployments (and builds on Node.js 18).
Annoyingly, there is currently an issue with Storybook (see: storybookjs/storybook#16555). We already have to do this in CI to make Playwright work, and it also affects Vercel deployments (and builds on Node.js 18). adeira-source-id: 41090407bb57247ef4d2e22677789a4787691fc1
Me too |
Node 17 is pretty far out-of-date now, and 16 is also deprecated. I'd recommend running with the latest node LTS if you're able to. |
I'm having this issue with Node 22.3 10% building 1/7 modules 6 active ...oferrari/Downloads/dnd-kit-master/node_modules/@storybook/addon-links/preview.js-generated-config-entry.jsnode:internal/crypto/hash:79 Error: error:0308010C:digital envelope routines::unsupported |
Describe the bug
When I running the cmd line ̀yarn build-storybook -c .storybook -o build/storybook` with Node 17.
I received this error:
I create a CRA project in order to reproduce the bug, and I get the error.
An issue on webpack was opened (#14532) and a workaround was found using
To Reproduce
npx sb init
yarn build-storybook -c .storybook -o build/storybook
System
The text was updated successfully, but these errors were encountered: