Cannot read property 'jsonData' of undefined (webpack5 and storybook/html)
See original GitHub issueDescribe the bug
I started a project using npx sb init --builder webpack5
and chose html for my future components. I cannot edit the stories because the builder breaks.
To Reproduce
I start the project with npm run storybook
and whenever I try to edit and save anything (like a .stories.js) the hot module restarts building but breaks immediately with an error:
webpack building...
3% setup watch run/Users/raduchiriac/Projects/-node/sb-temp/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/json/JsonGenerator.js:119
let data = module.buildInfo.jsonData;
^
TypeError: Cannot read property 'jsonData' of undefined
System System: OS: macOS Mojave 10.14.6 CPU: (8) x64 Intel® Core™ i7-4980HQ CPU @ 2.80GHz Binaries: Node: 14.17.2 - ~/.nvm/versions/node/v14.17.2/bin/node Yarn: 1.22.10 - /usr/local/bin/yarn npm: 6.14.13 - ~/.nvm/versions/node/v14.17.2/bin/npm Browsers: Chrome: 91.0.4472.114 Firefox: 88.0 Safari: 14.1.1 npmPackages: @storybook/addon-actions: ^6.3.2 => 6.3.2 @storybook/addon-essentials: ^6.3.2 => 6.3.2 @storybook/addon-links: ^6.3.2 => 6.3.2 @storybook/builder-webpack5: ^6.3.2 => 6.3.2 @storybook/html: ^6.3.2 => 6.3.2 @storybook/manager-webpack5: ^6.3.2 => 6.3.2
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:11
- Comments:10 (2 by maintainers)
Seems to be fixed in webpack
v5.42.1
:Could be fixed by setting:
package.json
It seems very much unrelated to storybook now. Focus moved here: https://github.com/webpack/webpack/issues/13691