Open unional opened 1 week ago
peer dependencies should be singletons, so it may happen that a different version gets installed and pnpm will print a warning about it. But if adding it to pkg-a
doesn't help, then it is an issue.
Using an override will probably help:
{
"pnpm": {
"overrides": {
"@vitest/browser": "2.1.5"
}
}
}
Verify latest release
pnpm version
9.14.2
Which area(s) of pnpm are affected? (leave empty if unsure)
Dependencies resolver
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Not able to create a repo yet. As with other dependency resolution issues, this seems to happen in some specific cases.
Describe the Bug
I got this when running
pnpm why -r @vitest/browser
on a private monorepoI have
vitest
and@vitest/coverage-v8
aspeerDependencies
inpkg-a
.It shows that
@vitest/browser 2.1.4
as peer ofvitest 2.1.5
. Which is wrong. Thepackage.json
invitest
is using exact version2.1.5
:I have tried using exact version
2.1.5
andcatalog:
inpkg-a
, both yield the same problem.Expected Behavior
pnpm
should install@vitest/browser 2.1.5
.I have tried deleting
node_modules
and that doesn't work either. I have to delete the lock file to get it to install 2.1.5.That explain why I can't create a simple repro.
Which Node.js version are you using?
22.9.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response