Skip to content
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

[Bug]: vite4 support - missing dependency upgrade #20190

Closed
marcoreni opened this issue Dec 9, 2022 · 6 comments
Closed

[Bug]: vite4 support - missing dependency upgrade #20190

marcoreni opened this issue Dec 9, 2022 · 6 comments

Comments

@marcoreni
Copy link

Describe the bug

Vite 4 is out, and 7.0.0-beta2 supports it, but there seems to be a little dependency leftover:

 WARN  Issues with peer dependencies found
.
└─┬ @storybook/react-vite 7.0.0-beta.2
  ├─┬ @storybook/builder-vite 7.0.0-beta.2
  │ └─┬ @vitejs/plugin-react 2.2.0
  │   └── ✕ unmet peer vite@^3.0.0: found 4.0.0 in @storybook/builder-vite
  └─┬ @vitejs/plugin-react 2.2.0
    └── ✕ unmet peer vite@^3.0.0: found 4.0.0 in @storybook/react-vite

In fact, vitejs/plugin-react should be updated to 3.0.0

To Reproduce

No response

System

No response

Additional context

No response

@IanVS
Copy link
Member

IanVS commented Dec 12, 2022

Ah, yes I forgot we include that as a fallback. Until we can get a fix out, you can use overrides or resolutions in your package.json to force the correct version to be used, but we'll get this updated quickly, thanks.

@shilman
Copy link
Member

shilman commented Dec 13, 2022

Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.0-beta.5 containing PR #20199 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease

Closing this issue. Please re-open if you think there's still more to do.

@shilman shilman closed this as completed Dec 13, 2022
Repository owner moved this from Required for beta announcement to Done in Core Team Projects Dec 13, 2022
@IanVS IanVS reopened this Dec 13, 2022
@IanVS
Copy link
Member

IanVS commented Dec 13, 2022

The referenced PR only updated ESBuild. We're handling vite elsewhere.

@iva2k
Copy link

iva2k commented Dec 28, 2022

For a workaround add:

// package.json
{
  ...
  "overrides": {
    "@vitejs/plugin-react": "^3.0.0"
  }
}

Works with npm, for pnpm put the same override inside "pnpm" section.

UPDATE: with 7.0.0-beta.15 should not need that. After I updated my package.json to 7.0.0-beta.15, I still had the error, and override was fixing it. I had to remove pnpm-lock.yaml and node_modules and do pnpm i to finally get rid of the problem.

@IanVS
Copy link
Member

IanVS commented Dec 28, 2022

@iva2k are you still having problems with the latest beta versions? It shouldn't require an override.

@iva2k
Copy link

iva2k commented Dec 28, 2022

@IanVS - it was not straightforward to sort it out. After I updated my package.json, I still had the error, and override was fixing it.
After removing pnpm-lock.yaml and node_modules and reinstalling pnpm i I finally got rid of the problem.

@IanVS IanVS closed this as completed Dec 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants