Skip to content
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

Webpack5: Cannot find module @storybook/semver #13980

Closed
mjchang opened this issue Feb 20, 2021 · 1 comment
Closed

Webpack5: Cannot find module @storybook/semver #13980

mjchang opened this issue Feb 20, 2021 · 1 comment

Comments

@mjchang
Copy link

mjchang commented Feb 20, 2021

Describe the bug
Got this build error when testing the webpack 5 release

> start-storybook -p 6006

info @storybook/react v6.2.0-alpha.31
info => Loading presets
WARN   Failed to load preset: "/Users/chang/frontend/node_modules/@storybook/builder-webpack5/dist/cjs/presets/preview-preset.js"
ERR! Error: Cannot find module '@storybook/semver/package.json'
ERR! Require stack:
ERR! - /Users/chang/frontend/node_modules/@storybook/builder-webpack5/dist/cjs/preview/iframe-webpack.config.js
ERR! - /Users/chang/frontend/node_modules/@storybook/builder-webpack5/dist/cjs/presets/preview-preset.js
ERR! - /Users/chang/frontend/node_modules/@storybook/core-common/dist/cjs/presets.js
ERR! - /Users/chang/frontend/node_modules/@storybook/core-common/dist/cjs/index.js
ERR! - /Users/chang/frontend/node_modules/@storybook/core-server/dist/cjs/index.js
ERR! - /Users/chang/frontend/node_modules/@storybook/core/dist/cjs/server.js
ERR! - /Users/chang/frontend/node_modules/@storybook/core/server.js
ERR! - /Users/chang/frontend/node_modules/@storybook/react/dist/cjs/server/index.js
ERR! - /Users/chang/frontend/node_modules/@storybook/react/bin/index.js

WARN Broken build, fix the error above.
WARN You may need to refresh the browser.

Essentially @storybook/semver is not installed. After installing, this error disappears. Previous versions didn't require me manually installing the package. Perhaps @storybook/semver is missing as a dependency from @storybook/builder-webpack5?

System

  System:
    OS: macOS 10.15.7
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Binaries:
    Node: 12.17.0 - ~/.nvm/versions/node/v12.17.0/bin/node
    Yarn: 1.21.1 - /usr/local/bin/yarn
    npm: 6.14.4 - ~/.nvm/versions/node/v12.17.0/bin/npm
  Browsers:
    Chrome: 88.0.4324.182
    Edge: 88.0.705.74
    Firefox: 85.0.2
    Safari: 14.0
  npmPackages:
    @storybook/addon-essentials: 6.2.0-alpha.31 => 6.2.0-alpha.31
    @storybook/addon-storyshots: 6.2.0-alpha.31 => 6.2.0-alpha.31
    @storybook/addons: 6.2.0-alpha.31 => 6.2.0-alpha.31
    @storybook/builder-webpack5: 6.2.0-alpha.31 => 6.2.0-alpha.31
    @storybook/react: 6.2.0-alpha.31 => 6.2.0-alpha.31
@mjchang mjchang changed the title Webpack 5: Cannot find module @storybook/semver Webpack5: Cannot find module @storybook/semver Feb 20, 2021
@shilman
Copy link
Member

shilman commented Feb 21, 2021

Jiminy cricket!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.2.0-alpha.32 containing PR #13982 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Feb 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants