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
Webpack 5 - TypeError: Cannot read property 'length' of undefined #14789
Comments
Do you have a repro repo you can share? |
Here. |
@shilman is there any update? |
|
I have the same issue and nothing is works |
OK, It is able to fix this issue by commenting this addon in main.js > preset-create-react-app
|
For those of you using CRA, at this point in time Storybook for CRA CAN'T be webpack5-compatible because CRA isn't webpack5-compatible and Storybook for CRA uses CRA's webpack config. |
Even if we have a webpack.config and make it explicit to storybook main.js file? Just for context, i've created a CRA app, but managed to run and build it as a webpack 5 project - mostly because of Module Federation. How can i run storybook + webpack 5 in this kind of project? |
@maugustosemperfi CRA5 with webpack5 support should be released soon; you'll probably need to wait for that. |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
@shilman just FYI |
@matheo Yes, I've stopped publishing for a bit. Aside from all the improvements that have been merged since then but unreleased, is there a problem with the latest alpha? Perhaps the issue is that manager-webpack5 doesn't exist anymore (breaking change) and there are no migration instructions? Cc @ndelangen @tmeasday |
@shilman |
@shilman Any progress on it? Problem still reprodusing for me with webpack 5 and module federation
|
It makes compilation fail after updating to Webpack 5 and Node 20 even though the documentation says is should work. https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#webpack-5 GitHub issues suggest that it is fixed by removing the plugin storybookjs/storybook#14789 (comment) It does not seem to make a difference to remove it entirely. This also reduces our dependency chain a bit.
Describe the bug
npm run storybook
failed withTypeError: Cannot read property 'length' of undefined
.To Reproduce
System
Additional context
I followed this
The text was updated successfully, but these errors were encountered: