You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
⭐Result: @types/react@^19 is auto installed (as a peer dep) in the .pnpm folder
🙏 Could anyone help me understand the resolution strategy?
It seems that if some workspace explicitly declares @types/react as a dep or dev dep, the root workspace won't auto install a peer dep to meet the sermantic version request.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
My pnpm version is 10, and my project folder structure as follows:
--pnpm-workspace.yaml
--package.json
--packages
----a
------package.json
{ devDependencies: { "@types/react": ^18 } }⭐Result:after run
pnpm install, only @types/react^18 installed, no @types/react^19 in the .pnpm folder.Then, i tried two different cases
case 1
--package.json
{ "devDependencies": { "bun-types": "latest" // it takes @types/react@^19 as a peer dep } }--packages
----a
------package.json
{ devDependencies: { "@types/react": ^18 } }----b
------package.json
{ devDependencies: { "@types/react": ^19 } }⭐Result: both @types/react^18 and @types/react@^19 are in the .pnpm folder
case 2
--package.json
{ "devDependencies": { "bun-types": "latest" // it takes @types/react@^19 as a peer dep } }--packages
----a
------ package.json
{ devDependencies: { // nothing } }⭐Result: @types/react@^19 is auto installed (as a peer dep) in the .pnpm folder
🙏 Could anyone help me understand the resolution strategy?
It seems that if some workspace explicitly declares @types/react as a dep or dev dep, the root workspace won't auto install a peer dep to meet the sermantic version request.
Beta Was this translation helpful? Give feedback.
All reactions