-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Storybook 6.5 does not work with vue 3 #18264
Comments
I'm seeing exactly the same error here after upgrading to Storybook 6.5.0 in a Vue 3 project. |
Any chance my issue might be related? #18271 |
When using https://github.com/storybookjs/builder-vite the issue is gone, and it works, but also had the same crash when upgrading from 6.4 to 6.5. Luckily, I already intended to move to Vite, as everything else in the project is using Vite. |
@yannbf looks like perhaps the last-minute webpack5 autodetection code broke vue3. you can see that @bodograumann 's repro is using builder/manager-webpack4. can you please look into this today? thanks! 🙏 |
Hey @bodograumann thank you so much for opening this issue, even more for providing a repro. I'm on it! |
Alright so the reason this is happening is because vue-loader provides both webpack4Plugin and webpack5Plugin, then checks the version of webpack to know which plugin to use. When requiring webpack, it will get it from |
1 work around would be to provide a resolution in package.json for webpack, I guess. |
The version range of storybook allows for both: storybook/app/vue3/package.json Line 67 in de741e3
The issue is that the package manager doesn't seem to install the same version as the user specified? Instead opting to install a newer version because it's technically allowed by storybook. We could change it to a peerDependency, but does that change anything? NPM installs peerDependencies by default, and yarn with pnp enabled will start complaining if the user doesn't have a direct dependency on webpack at all. It feels like that will not solve the issue at all, and potentially make it worse? |
Thanks @uoc1691 — I've got Storybook 6.5.12 working with Vue 3 now. |
We have been successfully using storybook 7.0 for some time now, so I am going to close this. Note to future self: If weird things happen try |
Describe the bug
When trying to create a storybook reproduction setup, even the default vue 3 configuration does not work. It shows the following error:
To Reproduce
Execute
npx "sb@^6.5" repro
to create a storybook 6.5 and select the vue 3 template.Start the storybook server with
yarn storybook
.I have published such an example here: https://github.com/bodograumann/storybook-6.5-vue3
System
The text was updated successfully, but these errors were encountered: