Closed sfe-efficy closed 1 year ago
vite
4.0.4
System: OS: Windows 10 10.0.19045 CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz Binaries: Node: 16.14.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (108.0.1462.76) npmPackages: @storybook/addon-a11y: 6.5.12 => 6.5.12 @storybook/addon-essentials: 6.5.12 => 6.5.12 @storybook/addon-links: 6.5.12 => 6.5.12 @storybook/builder-vite: 0.3.0 => 0.2.7 @storybook/client-logger: 6.5.12 => 6.5.12 @storybook/preset-typescript: 3.0.0 => 3.0.0 @storybook/vue3: 6.5.12 => 6.5.12
Hi!
It's missing to update the dependency @vitejs/plugin-react to v3.0 or higher. Current version is using vite 3.
npm WARN npm WARN Could not resolve dependency: npm WARN peer vite@"^3.0.0" from @vitejs/plugin-react@2.2.0 npm WARN node_modules/@vitejs/plugin-react npm WARN @vitejs/plugin-react@"^2.0.0" from @storybook/builder-vite@0.3.0 npm WARN node_modules/@storybook/builder-vite npm WARN npm WARN Conflicting peer dependency: vite@3.2.5 npm WARN node_modules/vite npm WARN peer vite@"^3.0.0" from @vitejs/plugin-react@2.2.0 npm WARN node_modules/@vitejs/plugin-react npm WARN @vitejs/plugin-react@"^2.0.0" from @storybook/builder-vite@0.3.0 npm WARN node_modules/@storybook/builder-vite
I know that v0.3.0 is for Vite 4 and I'm trying to jump to that one.
I want to say, in order to install @storybook/builder-vite@0.3.x with Vite 4 is required to update vitejs/plugin-react dependency to a higher version.
In package.json file you can see the plugin still usin @vitejs/plugin-react@^2.0.0 https://github.com/storybookjs/builder-vite/blob/v0.3.0/packages/builder-vite/package.json#L34
And you can see @vitejs/plugin-react@^2.0.0 requires Vite 3. https://github.com/vitejs/vite/blob/plugin-react%402.2.0/packages/plugin-react/package.json#L50
So, It's not possible to jump to version @vitejs/plugin-react@3.0.0 that requires Vite 4.
That's why I post the comment here in the related MR that was changed the code.
No response
Ah, thank you. I'll get this fixed asap.
I'm working on this but have hit a small snag. You can watch https://github.com/storybookjs/builder-vite/pull/548 for updates.
What version of
vite
are you using?4.0.4
System info and storybook versions
System: OS: Windows 10 10.0.19045 CPU: (16) x64 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz Binaries: Node: 16.14.2 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD Browsers: Edge: Spartan (44.19041.1266.0), Chromium (108.0.1462.76) npmPackages: @storybook/addon-a11y: 6.5.12 => 6.5.12 @storybook/addon-essentials: 6.5.12 => 6.5.12 @storybook/addon-links: 6.5.12 => 6.5.12 @storybook/builder-vite: 0.3.0 => 0.2.7 @storybook/client-logger: 6.5.12 => 6.5.12 @storybook/preset-typescript: 3.0.0 => 3.0.0 @storybook/vue3: 6.5.12 => 6.5.12
Describe the Bug
Hi!
It's missing to update the dependency @vitejs/plugin-react to v3.0 or higher. Current version is using vite 3.
I know that v0.3.0 is for Vite 4 and I'm trying to jump to that one.
I want to say, in order to install @storybook/builder-vite@0.3.x with Vite 4 is required to update vitejs/plugin-react dependency to a higher version.
In package.json file you can see the plugin still usin @vitejs/plugin-react@^2.0.0 https://github.com/storybookjs/builder-vite/blob/v0.3.0/packages/builder-vite/package.json#L34
And you can see @vitejs/plugin-react@^2.0.0 requires Vite 3. https://github.com/vitejs/vite/blob/plugin-react%402.2.0/packages/plugin-react/package.json#L50
So, It's not possible to jump to version @vitejs/plugin-react@3.0.0 that requires Vite 4.
That's why I post the comment here in the related MR that was changed the code.
Link to Minimal Reproducible Example
No response
Participation