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
[Docs] Clarify vite peer dependency requirements in README #436
Comments
I see from #433 that this is expected. It's perhaps worth pointing out that when you run |
Doh, turns out I didn't publish it correctly, and |
Ok, I've fixed the |
I'll leave this open until I update the readme. |
Thank you! And no worries at all. FWIW I can think of a few cases where you'd want to use Vite for Storybook but not for your app:
|
Interesting. I was under the (perhaps flawed) impression that next.js apps are so intricately tied to webpack that there's no good way to use vite with them. And, I'm not sure I'd recommend mixing build tools between the app and storybook, since one of the goals of most storybooks is to represent the components of the app as accurately as possible. If they're being built with two different tools, there could be subtle differences, making testing and QA with storybook less reliable. And, the way things are now with vite being a peer dependency, it's still technically possible to do what you are talking about, you just have to know that you've got to install vite, which deserves some mention in our docs. |
I'm getting some interesting behavior here
|
@AskAlice I wasn't able to reproduce this in a new project without vite. Do you have any hints on how I can reproduce this? |
I am receiving the same error as @AskAlice trying to start Storybook after a clean installation in Svelte with Vite |
I've updated the README to mention the versions of vite required. @timonmasberg would you mind opening a new issue with the details of what you're seeing? Thanks! |
After upgrading Vite to v3 it works, thanks for clarifying. |
What version of
vite
are you using?2.9.14
System info and storybook versions
System:
OS: macOS 12.3.1
CPU: (8) arm64 Apple M1
Binaries:
Node: 16.15.0 - ~/.nvm/versions/node/v16.15.0/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 8.9.0 - ~/.config/yarn/global/node_modules/.bin/npm
Browsers:
Chrome: 103.0.5060.114
Firefox: 101.0.1
Safari: 15.4
npmPackages:
@storybook/addon-actions: ^6.5.9 => 6.5.9
@storybook/addon-essentials: ^6.5.9 => 6.5.9
@storybook/addon-links: ^6.5.9 => 6.5.9
@storybook/addon-postcss: ^2.0.0 => 2.0.0
@storybook/builder-vite: ^0.2.0-beta.1 => 0.2.0-beta.1
@storybook/react: ^6.5.9 => 6.5.9
Describe the Bug
See fwouts/hungry#9 for easy repro (just checkout the branch and run
yarn storybook
).This particular crash disappears if I also install the latest Vite 3 beta.
Suggested solution: Should Vite 3 be an explicit dependency of
vite-builder
?Link to Minimal Reproducible Example
https://github.com/fwouts/hungry/tree/vite-builder-0.2
Participation
The text was updated successfully, but these errors were encountered: