We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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
https://github.com/bryanjtc/storybook-7-vite-test
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)
The problem may be related to the change introduced in this pr #25925
The text was updated successfully, but these errors were encountered:
Can be fixed with #26024 Waiting until beta 3 to test the fix.
Sorry, something went wrong.
8.0.0-beta.3 is released. @bryanjtc Can you give it a try?
It's fixed.
I've got the same issue with storybook v7.6.17 (build only) is there may be something similar?
No branches or pull requests
Describe the bug
Vite fails to build the preview. Rollup can't resolve the import "@storybook/locks" from "@storybook/addon-docs"
To Reproduce
https://github.com/bryanjtc/storybook-7-vite-test
System
Additional context
The problem may be related to the change introduced in this pr #25925
The text was updated successfully, but these errors were encountered: