Skip to content

Latest release broke storybook #362

@ndelangen

Description

@ndelangen

In 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)

link to CI

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:
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:
#324

@markjm @sokra Do you have any recommendations for us?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions