-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Last pnpm version that worked
9.12.3
pnpm version
Reproducible on 9.13.2 up to the latest 10.12.1
Code to reproduce the issue
Update: Full reproduction repo: https://github.com/reekystive/pnpm-peers-deadlock-issue
{
"name": "pnpm-issue",
"packageManager": "pnpm@9.13.2",
"dependencies": {
"@private/pkg-a": "1.0.0",
"@private/pkg-b": "1.0.0",
"@private/another-pkg-b": "npm:@private/pkg-b@2.0.0",
"@private/another-pkg-c": "npm:@private/pkg-c@2.0.0"
}
}
Expected behavior
Installation completes within a few seconds, as it does in 9.12.3.
Actual behavior
The installation hangs permanently at the Progress stage. CPU usage drops to 0 %. The process must be terminated manually.
Additional information
Upgrading from pnpm 9.12.3 to 9.13.2 (or any newer release up to 10.12.1, tested 2025‑06‑20) causes pnpm i
to hang forever at the Progress stage.
Version 9.13.1 previously crashed with Duplicate edge specification (see #8759); the fix shipped in #8760 (version 9.13.2) eliminated that error but introduced a dead‑lock in peer‑dependency resolution.
pnpm version | Behaviour | Notes |
---|---|---|
9.12.3 | ✅ Installation succeeds | Last good version |
9.13.1 | ❌ Throws Duplicate edge specification from "@private/pkg-b" | Reported in #8759 |
9.13.2 – 10.12.1 | ⏳ Hangs at Progress | Regression after merging #8760 |
pnpm/pkg-manager/resolve-dependencies/src/resolvePeers.ts
Lines 570 to 579 in bd01a2a
...await Promise.all(pendingPeerNodes | |
.map(async (pendingPeer) => { | |
if (cyclicPeerAliases.has(pendingPeer.alias)) { | |
const { name, version } = ctx.dependenciesTree.get(pendingPeer.nodeId)?.resolvedPackage as T | |
const id = `${name}@${version}` | |
ctx.pathsByNodeIdPromises.get(pendingPeer.nodeId)?.resolve(id as DepPath) | |
return id | |
} | |
return ctx.pathsByNodeIdPromises.get(pendingPeer.nodeId)!.promise | |
}) |
resolvePeers.ts
line 578 now returns a Promise that is never resolved.
await Promise.all(finishingList) |
Therefore the Promise.all(finishingList)
at line 152 waits forever.
Node.js version
22.15.0
Operating System
macOS