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] Vite v6 support #29726

Open artaommahe opened 11 hours ago

artaommahe commented 11 hours ago

What version of vite are you using?

6.0.1

System info and storybook versions

  System:
    OS: macOS 15.1.1
    CPU: (10) arm64 Apple M2 Pro
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.18.1 - ~/.nvm/versions/node/v20.18.1/bin/node
    npm: 10.8.2 - ~/.nvm/versions/node/v20.18.1/bin/npm <----- active
  Browsers:
    Chrome: 131.0.6778.86
    Safari: 18.1.1
  npmPackages:
    @storybook/addon-a11y: ^8.4.5 => 8.4.5 
    @storybook/addon-essentials: ^8.4.5 => 8.4.5 
    @storybook/react: ^8.4.5 => 8.4.5 
    @storybook/react-vite: ^8.4.5 => 8.4.5 
    @storybook/test: ^8.2.9 => 8.4.5 
    @storybook/theming: ^8.2.2 => 8.4.5 
    chromatic: ^11.19.0 => 11.19.0 
    eslint-plugin-storybook: ^0.11.1 => 0.11.1 
    storybook: ^8.1.11 => 8.4.5 
    storybook-addon-mock: ^5.0.0 => 5.0.0 
    storybook-addon-pseudo-states: ^4.0.2 => 4.0.2 
    storybook-addon-remix-react-router: ^3.0.2 => 3.0.1 

Describe the Bug

cant install vite v6 cause @storybook/react-vitedoesn't support it

$ npm install
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: @storybook/react-vite@8.4.5
npm error Found: vite@6.0.1
npm error node_modules/vite
npm error   dev vite@"^6.0.1" from the root project
npm error   peer vite@"^4.2.0 || ^5.0.0 || ^6.0.0" from @vitejs/plugin-react@4.3.4
npm error   node_modules/@vitejs/plugin-react
npm error     dev @vitejs/plugin-react@"^4.3.4" from the root project
npm error   8 more (@vitest/mocker, vite-node, vite-plugin-checker, ...)
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 Conflicting peer dependency: vite@5.4.11
npm error node_modules/vite
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

Link to Minimal Reproducible Example

No response

Participation

greptile-apps[bot] commented 6 hours ago

Disclaimer This information might be inaccurate, due to it being generated automatically This requires updating the peer dependency for Vite in @storybook/react-vite. The change needs to be made in the package.json of the code/frameworks/react-vite package to update the peerDependency from "vite": "^4.0.0 || ^5.0.0" to include v6: "vite": "^4.0.0 || ^5.0.0 || ^6.0.0".

Additionally, any Vite-specific code in the builder implementation should be tested with v6 to ensure compatibility.

#### About Greptile This response provides a starting point for your research, not a precise solution. Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. [Edit Issue Bot Settings](https://app.greptile.com/enrich/github) · [Greptile](https://greptile.com)