-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Vue2 with vite, cannot get it to start up. #18293
Comments
I remember a comment from eirslett (who originally wrote the Vite builder) before it moved to the Storybook organization. This might be the reason why you're running into issues. One of the latest replies mentions a fork to have Vue2 compatibility, just keep in mind this might not be as much up-to-date than the "official" integration of the builder. |
Thanks @Dschungelabenteuer, that got me a little further :)
Anybody have any ideas? :) |
@yannbf I see you've self-assigned yourself, please dont hesitate to ask if there is anything i can do or provide to help :) |
@jens-morten-mikkelsen I looked into this briefly at some point in the past month. Here is a basic repo I got working in case it's of any help: https://github.com/shilman/vue2-vite The vite builder intentionally does not support Vue2. I think if you want support you'll need to convince the maintainers that it is worthwhile. AFAIK they are, understandably, trying to not get dragged down by legacy support. |
@shilman Thanks for the reply, i'll have a look at your repo :) |
@shilman I've updated my storybook/main.js, and is now getting a new error:
I can see that in your repo you get a |
After installing
|
A little update, i'm still not able to get this working, it seems like there is something, somewhere that has one or more dependencies that are either not listed or not installed. |
Just in case this helps you, IIRC last time I ran into this
|
Jeepers creepers!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.35 containing PR #19230 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
@shilman I just tried running
after running But since i am coming to terms with the sad fact that it might just be a vue2.6 issue, and the fact that we currently have no scope on being able to move to 2.7 or 3. I will not reopen this issue, but only leave this as an information to you :) |
Pretty sure we're Vite3+ now. @IanVS can you chime in here? |
@jens-morten-mikkelsen yes, that error indicates that you're using an older version of vite and/or vite plugins. Please update to vite 3 and the latest version of your vite plugin for vue. |
Describe the bug
I'm working on a project where we are using Vite for compiling, but due to a hard ie11 requirement we are using vue2, which works great using
vue-demi
.But when i try and setup Storybook on the project, either using
npx sb init --builder @storybook/builder-vite
ornpx storybook init
. It first of all breaksvue-demi
in a way that it cant find its own installation of@vue/composition-api
, but this i got around by just manually installing@vue/composition-api
.But no matter what then, when i try and run
npm run storybook
it breaks with:To Reproduce
broken repo: https://github.com/jens-morten-mikkelsen/modern
System
System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Binaries:
Node: 16.14.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 8.5.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 101.0.4951.67
Edge: Spartan (44.19041.1266.0), Chromium (101.0.1210.47)
npmPackages:
@storybook/addon-actions: ^6.5.3 => 6.5.3
@storybook/addon-essentials: ^6.5.3 => 6.5.3
@storybook/addon-interactions: ^6.5.3 => 6.5.3
@storybook/addon-links: ^6.5.3 => 6.5.3
@storybook/builder-vite: ^0.1.35 => 0.1.35
@storybook/testing-library: ^0.0.11 => 0.0.11
@storybook/vue: ^6.5.3 => 6.5.3
Additional context
The Vite/Vue2 setup live inside an OLD angularJS project, and we are using it to slowly move away from angularJS and into vue. But this should not have any effect on the project.
The text was updated successfully, but these errors were encountered: