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

[Bug]: 8.0.0-beta.1 breaks storybook build in yarn pnp #26070

Closed
bryanjtc opened this issue Feb 16, 2024 · 4 comments
Closed

[Bug]: 8.0.0-beta.1 breaks storybook build in yarn pnp #26070

bryanjtc opened this issue Feb 16, 2024 · 4 comments

Comments

@bryanjtc
Copy link
Member

Describe the bug

Vite fails to build the preview. Rollup can't resolve the import "@storybook/locks" from "@storybook/addon-docs"

x Build failed in 1.76s
=> Failed to build the preview
Error: [vite]: Rollup failed to resolve import "@storybook/blocks" from "G:/repo/storybook-7-vite-test/.yarn/cache/@storybook-addon-docs-npm-8.0.0-beta.1-b40e5b7489-8848ff0944.zip/node_modules/@storybook/addon-docs/dist/chunk-HLWAVYOI.mjs".
This is most likely unintended because it can break your application at runtime.
If you do want to externalize this module explicitly add it to
`build.rollupOptions.external`
    at viteWarn (file:///G:/repo/storybook-7-vite-test/.yarn/__virtual__/vite-virtual-b96dca4f1e/0/cache/vite-npm-5.1.3-ed3f8d8e35-d3b19607d7.zip/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:67046:27)
    at onRollupWarning (file:///G:/repo/storybook-7-vite-test/.yarn/__virtual__/vite-virtual-b96dca4f1e/0/cache/vite-npm-5.1.3-ed3f8d8e35-d3b19607d7.zip/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:67074:9)
    at onwarn (file:///G:/repo/storybook-7-vite-test/.yarn/__virtual__/vite-virtual-b96dca4f1e/0/cache/vite-npm-5.1.3-ed3f8d8e35-d3b19607d7.zip/node_modules/vite/dist/node/chunks/dep-stQc5rCc.js:66778:13)
    at file:///G:/repo/storybook-7-vite-test/.yarn/cache/rollup-npm-4.12.0-f631a9b21e-1650168231.zip/node_modules/rollup/dist/es/shared/node-entry.js:18308:13
    at Object.logger [as onLog] (file:///G:/repo/storybook-7-vite-test/.yarn/cache/rollup-npm-4.12.0-f631a9b21e-1650168231.zip/node_modules/rollup/dist/es/shared/node-entry.js:19965:9)
    at ModuleLoader.handleInvalidResolvedId (file:///G:/repo/storybook-7-vite-test/.yarn/cache/rollup-npm-4.12.0-f631a9b21e-1650168231.zip/node_modules/rollup/dist/es/shared/node-entry.js:18909:26)
    at file:///G:/repo/storybook-7-vite-test/.yarn/cache/rollup-npm-4.12.0-f631a9b21e-1650168231.zip/node_modules/rollup/dist/es/shared/node-entry.js:18867:26

To Reproduce

https://github.com/bryanjtc/storybook-7-vite-test

System

Storybook Environment Info:

  System:
    OS: Windows 11 10.0.22631
    CPU: (12) x64 AMD Ryzen 5 5600X 6-Core Processor
  Binaries:
    Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
    Yarn: 4.1.0 - C:\Program Files\nodejs\yarn.CMD <----- active
    npm: 10.1.0 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Chromium (121.0.2277.128)

Additional context

The problem may be related to the change introduced in this pr #25925

@bryanjtc
Copy link
Member Author

bryanjtc commented Feb 16, 2024

Can be fixed with #26024
Waiting until beta 3 to test the fix.

@valentinpalkovic
Copy link
Contributor

8.0.0-beta.3 is released. @bryanjtc Can you give it a try?

@bryanjtc
Copy link
Member Author

It's fixed.

@ManAnRuck
Copy link

ManAnRuck commented Mar 8, 2024

I've got the same issue with storybook v7.6.17 (build only)
is there may be something similar?

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

3 participants