-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
[Bug]: Storybook build and dev server not working after updating to Node.js 18 #19692
Comments
downgrading node to v16.13.0 avoids the error for me. Not really a valid solution though... I'm also using M1 Mac... Is that somehow related to issue? |
I just noticed that the Storybook dev server also doesn't work in Node.js 18. I updated the issue description to include that. |
Looking around this does seem to be a node/webpack specific issue... I guess I would want to ask anyone using storybook, are they able to run / build storybook using node 17 or 18 at all? Does everyone just use Node 16? |
I'm currently checking the following in storybook docs... https://storybook.js.org/docs/react/builders/webpack |
Bingo! i think this solves it. by default storybook uses Webpack 4. if you set storybook to use Webpack 5, i am able to run yarn storybook on node v18.2.0 https://storybook.js.org/docs/react/builders/webpack @dcastil can you let me know if this solves the issue for you too? I followed these instructions from the docs: " Webpack 5
" |
Hey @CraigWatt! Ah nice that it works with webpack5. Unfortunately I can't switch to it in my app because we're using the Vite builder which forces us to use After some searching I also came along a definitive answer to the problem in storybookjs/builder-vite#414 (comment):
This means we need to wait for Storybook v7 for this to get resolved and use the workarounds in the meantime. |
This was the solution for me
|
This fixes an error I was seeing after upgrading to Node 18 relating to digital envelope routines. Specifically the error code was ERR_OSSL_EVP_UNSUPPORTED. This comment on a related GH thread was useful: storybookjs/storybook#19692 (comment)
As part of upgrading Node it was necessary to switch Storybook to use Webpack 5. This fixes an error I was seeing after upgrading to Node 18 relating to digital envelope routines. Specifically the error code was ERR_OSSL_EVP_UNSUPPORTED. This comment on a related GH thread was useful: storybookjs/storybook#19692 (comment)
Due to a change in the OpenSSL API in Node 17, storybook fails to run without openssl-legacy-provider. This can be omitted by upgrading Storybook to version 7 or higher. storybookjs/storybook#19692 (comment)
Describe the bug
After I updated from Node.js 16 to 18, the
storybook-build
command fails with following error message:To Reproduce
Run this in the CLI:
System
Additional context
The problem seems to be due to a change in the OpenSSL API in Node 17. There is a workaround for this: Run Node.js with the option
--openssl-legacy-provider
, e.g. by adding the environment variableNODE_OPTIONS=--openssl-legacy-provider
.Possibly related:
The text was updated successfully, but these errors were encountered: