When using pnpm i
to install dependencies, it does not prioritize searching for packages with the same name in the workspace.
#7973
Labels
Verify latest release
pnpm version
9.0.4
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
https://github.com/TransonQ/pnpm-9-monorpeo-demo
Reproduction steps
open repository minimal reproduction pnpm-9-monorpeo-demo。
apps/aaa/
(pnpm v9.0.4)apps/aaa/
(pnpm v8.15.7)Describe the Bug
When I execute pnpm i @test/utils in the project, pnpm does not prioritize searching for the local workspace, but instead directly searches the npm registry, resulting in an error. Even though I manually added the workspace dependency in the project, I still encounter the same error. Is there a change in the pnpm workspace mechanism? I couldn't find any relevant explanation in the documentation.
Expected Behavior
pnpm should prioritize searching for packages within the workspace.
Which Node.js version are you using?
v18.20.1
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
No response
The text was updated successfully, but these errors were encountered: