Latest release broke storybook
See original GitHub issueIn the latest release (about 2 hours ago since the time of writing this), storybook broke if users upgrade to the latest version of this package.
It seems that the virtual-modules-plugin we use is not compatible with this change: https://www.npmjs.com/package/webpack-virtual-modules
We see the following error happening in our CI:
ERR! => Failed to build the preview
ERR! Module not found: Error: Can't resolve '/tmp/storybook/sandbox/angular-cli-13-ts/storybook-config-entry.js' in '/tmp/storybook/sandbox/angular-cli-13-ts'
ERR! /tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/Compilation.js:2016
ERR! const notFoundError = new ModuleNotFoundError(
ERR! ^
ERR!
ERR! ModuleNotFoundError: Module not found: Error: Can't resolve '/tmp/storybook/sandbox/angular-cli-13-ts/storybook-config-entry.js' in '/tmp/storybook/sandbox/angular-cli-13-ts'
ERR! at <anonymous> (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/Compilation.js:2016:28)
ERR! at <anonymous> (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/NormalModuleFactory.js:798:13)
ERR! at eval (eval at create (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/tapable/lib/HookCodeFactory.js:28:14), <anonymous>:10:1)
ERR! at <anonymous> (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/NormalModuleFactory.js:270:22)
ERR! at eval (eval at create (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/tapable/lib/HookCodeFactory.js:28:14), <anonymous>:9:1)
ERR! at <anonymous> (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/NormalModuleFactory.js:434:22)
ERR! at <anonymous> (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/NormalModuleFactory.js:116:11)
ERR! at <anonymous> (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/NormalModuleFactory.js:670:25)
ERR! at <anonymous> (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/NormalModuleFactory.js:855:8)
ERR! at <anonymous> (/tmp/storybook/sandbox/angular-cli-13-ts/node_modules/@storybook/builder-webpack5/node_modules/webpack/lib/NormalModuleFactory.js:975:5)
The file .../storybook-config-entry.js
, is injected as a virtual module using the plugin described above.
When we version lock to 5.10.0 the problem goes away.
comparing 5.10.0 & 5.11.0: https://github.com/webpack/enhanced-resolve/compare/v5.10.0...v5.11.0
It looks like this code was added:
{ throwIfNoEntry: false }
link to change
Looks like it was introduced in this PR: https://github.com/webpack/enhanced-resolve/pull/324
Issue Analytics
- State:
- Created 10 months ago
- Reactions:45
- Comments:11 (4 by maintainers)
I’ll open a PR that reverts this change, hopefully @sokra can take a look soon.
would it be possible to roll this back?