storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.77k stars 9.34k forks source link

[Bug]: Running Storybook with vite v6.0.0 #29719

Open omarihab99 opened 1 day ago

omarihab99 commented 1 day ago

Describe the bug

Hi, I tried running npx storybook@latest init after npm create vite@latest (using react + typescript) . I got the following from storybook.log:

npm error code ERESOLVE npm error ERESOLVE unable to resolve dependency tree npm error npm error While resolving: storybook-vitev6@0.0.0 npm error Found: vite@6.0.0 npm error node_modules/vite npm error dev vite@"^6.0.0" from the root project npm error npm error Could not resolve dependency: npm error peer vite@"^4.0.0 || ^5.0.0" from @storybook/react-vite@8.4.5 npm error node_modules/@storybook/react-vite npm error dev @storybook/react-vite@"^8.4.5" from the root project npm error npm error Fix the upstream dependency conflict, or retry npm error this command with --force or --legacy-peer-deps npm error to accept an incorrect (and potentially broken) dependency resolution. npm error npm error npm error For a full report see: npm error /Users/omarihab/.npm/_logs/2024-11-26T20_17_48_529Z-eresolve-report.txt npm error A complete log of this run can be found in: /Users/omarihab/.npm/_logs/2024-11-26T20_17_48_529Z-debug-0.log

Reproduction link

https://github.com/omarihab99/storybook-vitev6

Reproduction steps

System

Storybook Environment Info:

  System:
    OS: macOS 15.1
    CPU: (8) arm64 Apple M1
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v18.20.2/bin/yarn
    npm: 10.8.2 - ~/.nvm/versions/node/v18.20.2/bin/npm <----- active
  Browsers:
    Chrome: 131.0.6778.86
    Safari: 18.1

Additional context

No response

hobadams commented 21 hours ago

Bump this. I know vite 6 is VERY new but this would be a cool add.

yannbf commented 19 hours ago

Hey everyone, we appreciate the report! As you know Vite 6 was released yesterday, but we already have code to support it prepared for our upcoming release. However, the ecosystem is still catching up (given Vite 6 was just released), so it's not a straightforward release. Support is coming really soon 🤞