-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Since v0.34.4 Yarn installs two different versions of Vite. #4112
Comments
Could see as well (yarn 4rc50) although it doesn't break my tests. "vite": "4.4.9",
"vitest": "0.34.4",
|
yeah, it's been happening for a while, seemingly random... very annoying.. as a workaround you can fix the version of vite via
|
I am honestly not sure how package managers resolve this, but since this is the correct semver string, I would assume they support it. I am open to any changes that would fix this problem. |
Vitest doesn't use |
Describe the bug
This PR in v0.34.4 introduced a union operator (
||
) for the Vite dependency to include support for Vite v5.0. Because of how Yarn handles union operators, this means that any Yarn project specifying a dependency on Vite v4 and Vitest v0.34.4 will end up with two different versions of Vite installed.In other words, this
package.json
:Results in this output from
yarn why vite
:Reproduction
https://github.com/jgerigmeyer/vitest-vite-version
System Info
Used Package Manager
yarn
Validations
The text was updated successfully, but these errors were encountered: