Skip to content

Installation hangs indefinitely when resolving peers in pnpm 9.13.2 – 10.12.1 (regression of #8760) #9673

@reekystive

Description

@reekystive

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

...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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy