Open ibocon opened 3 years ago
Do you have a repro repo you can share?
@shilman is there any update?
@shilman Facing the same issue
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 The both commands "storybook" and "build-storybook" will magically works after this little change. I installed storybook as clean installation via: "npx sb@next init --builder webpack5" and comment line in main.js
module.exports = {
"stories": [
"../src/**/*.stories.mdx",
"../src/**/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
/*"@storybook/preset-create-react-app"*/
],
"core": {
"builder": "webpack5"
}
}
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.
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 @storybook/manager-webpack5
hasn't published alphas since 10 days ago
https://www.npmjs.com/package/@storybook/manager-webpack5
and I failed to install the alpha.13
because of that
@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 npm
complained that it doesn't exist, because I'm using nx
and it was present on my package.json
so I removed it and everything went fine. A deprecation note would help so when we see the package in npmjs.com
we search and remove it :)
@shilman Any progress on it? Problem still reprodusing for me with webpack 5 and module federation
...
"@storybook/addon-actions": "^6.5.12",
"@storybook/addon-essentials": "^6.5.12",
"@storybook/addon-interactions": "^6.5.12",
"@storybook/addon-links": "^6.5.12",
"@storybook/builder-webpack5": "^6.5.12",
"@storybook/manager-webpack5": "^6.5.12",
"@storybook/react": "^6.5.12",
...
Describe the bug
npm run storybook
failed withTypeError: Cannot read property 'length' of undefined
.To Reproduce
System![image](https://user-images.githubusercontent.com/9730869/116954257-6c94e280-acca-11eb-98eb-034b479fe0ea.png)
Additional context
I followed this