question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Bug] Compatibility with vue 2.7 and @vitejs/plugin-vue2

See original GitHub issue

What version of vite are you using?

3.2.0

System info and storybook versions

System: OS: Linux 5.15 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish) CPU: (8) x64 11th Gen Intel® Core™ i7-1165G7 @ 2.80GHz Binaries: Node: 16.18.0 - /usr/bin/node Yarn: 1.22.19 - /usr/bin/yarn npm: 8.19.2 - /usr/bin/npm Browsers: Chrome: 102.0.5005.61 Firefox: 106.0.3 npmPackages: @storybook/addon-actions: ^6.5.9 => 6.5.13 @storybook/addon-essentials: ^6.5.9 => 6.5.13 @storybook/addon-links: ^6.5.9 => 6.5.13 @storybook/addon-postcss: ^2.0.0 => 2.0.0 @storybook/addons: ^6.5.9 => 6.5.13 @storybook/builder-vite: 0.1.x => 0.1.41 @storybook/theming: ^6.5.9 => 6.5.13 @storybook/vue: ^6.5.9 => 6.5.13

Describe the Bug

Trying to use with vue 2.7 got this compatibility/dependency error.

Error: @storybook/builder-vite requires @vitejs/plugin-vue to be installed when using @storybook/vue or @storybook/vue3. Please install it and start storybook again.

But vue 2.7 does not require @vitejs/plugin-vue because it uses @vitejs/plugin-vue-2 So you cannot use this builder if you are using vue 2.7

Thanks!

Link to Minimal Reproducible Example

not necessary

Participation

  • I am willing to submit a pull request for this issue.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
IanVScommented, Nov 3, 2022

In your issue you said you are using vite 3.2.0, which means you can use the new version of this package. If you’re on an old 2.x version of vite, and you want to use vue 2.7 and storybook builder-vite, you’ll need to upgrade vite.

0reactions
IanVScommented, Nov 3, 2022

Great, glad it’s working! 🙌

Read more comments on GitHub >

github_iconTop Results From Across the Web

vitejs/vite-plugin-vue2: Vite plugin for Vue 2.7 - GitHub
Note: this plugin only works with Vue@^2.7.0. // vite.config.js import vue from '@vitejs/plugin-vue2' export default { plugins: [vue()] } ...
Read more >
@vitejs/plugin-vue - npm
Start using @vitejs/plugin-vue in your project by running `npm i ... vite.config.js import vue from '@vitejs/plugin-vue' export default ...
Read more >
How to use Vue 2 with Vite - Mat's Blog
First we'll need to create a new Vite app using the Vue 3 template. npm init @vitejs/app vue2-vite --template vue; # Init vite...
Read more >
Vuejs 3 webpack : Problem with vue-template-compiler
So, when I try to compile I get this error: Vue packages version mismatch: - vue@3.0.2 (/home/alejo/playground ...
Read more >
Vue and Web Components
Consuming custom elements inside a Vue application largely works the same as using ... vite.config.js import vue from '@vitejs/plugin-vue' export default ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found