Verify latest release
pnpm version
10.33.0
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/maxpatiiuk/pnpm-aliased-peer-warning
Reproduction steps
-
Clone this repository
git clone https://github.com/maxpatiiuk/pnpm-aliased-peer-warning
cd pnpm-aliased-peer-warning
-
Go into b/
-
Install dependencies
See the warning.
Describe the Bug
PNPM warns about unmet peer dependency when a dependency is coming from outside the workspace, and it declares a peer dependency using an npm: alias syntax.
The warning only happens only on the first pnpm call or if you changed dependencies:
~/s/e/pnpm-aliased-peer/b main *❯ pnpm
Packages: +2
++
Progress: resolved 2, reused 2, downloaded 0, added 2, done
WARN Issues with peer dependencies found
.
└─┬ a 1.0.0
└── ✕ unmet peer tslib-aliased@npm:tslib@^2.8.1: found 2.8.1
dependencies:
+ a 1.0.0
+ tslib-aliased <- tslib 2.8.1
Done in 354ms using pnpm v10.32.1
~/s/e/pnpm-aliased-peer/b main *❯ pnpm
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 229ms using pnpm v10.32.1
Expected Behavior
The warning is not expected - both tslib and tslib-aliased are declared as dependencies.
Not reproducible if the package in question (a/) comes from the current workspace, or uses a relative file path instead of a tarball.
I am using tslib just as an example. Reproducible with other deps.
Workaround:
Add this in pnpm-workspace.yaml:
peerDependencyRules:
allowedVersions:
"tslib-aliased": "2.8.1"
Which Node.js version are you using?
v24.14.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
Verify latest release
pnpm version
10.33.0
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/maxpatiiuk/pnpm-aliased-peer-warning
Reproduction steps
Clone this repository
git clone https://github.com/maxpatiiuk/pnpm-aliased-peer-warning cd pnpm-aliased-peer-warningGo into
b/Install dependencies
See the warning.
Describe the Bug
PNPM warns about unmet peer dependency when a dependency is coming from outside the workspace, and it declares a peer dependency using an npm: alias syntax.
The warning only happens only on the first
pnpmcall or if you changed dependencies:Expected Behavior
The warning is not expected - both
tslibandtslib-aliasedare declared as dependencies.Not reproducible if the package in question (
a/) comes from the current workspace, or uses a relative file path instead of a tarball.I am using
tslibjust as an example. Reproducible with other deps.Workaround:
Add this in
pnpm-workspace.yaml:peerDependencyRules: allowedVersions: "tslib-aliased": "2.8.1"Which Node.js version are you using?
v24.14.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