Skip to navigation

pnpm Peer Diagnostics: Read Resolution Reports Before Claude Code Pins

In short: Find how pnpm reports peer dependency conflicts and which policy or installation setting explains the output.

Published 20 min read
On this page

Direct answer

A pnpm peer dependency report answers three separate questions, and reading them as one is what pushes teams into premature version pins. The first question is policy: which peer ranges the packages in the graph declare. The second is installation: whether pnpm resolved or auto-installed those peers, and which setting made that happen. The third is rendering: how the current version chose to print the problem. A peer conflict that shows up as an error can come from a strict peer policy, from a missing peer that nobody declared, or from a diagnostic that changed shape between versions. Pinning a version fixes only the second case, and only sometimes.

The concrete win is a resolution decision you can defend in review, because you can name the policy, the provider, and the setting behind the report. The concrete loss is that a GitHub issue about diagnostic output is evidence about that issue, not a rule about your workspace. Treat one report as a pointer, then confirm the behavior in your own tree before changing a manifest.

Why an unread peer report costs a release

Peer conflicts arrive at the worst moment, which is usually the upgrade PR. A dependency bump adds a peer requirement, the install fails or warns, and the fastest looking fix is to force a version. A fix like that can hide the actual problem for months: a peer was never declared by its real provider, or an automatic installation supplied a version nobody reviewed.

Three costs follow. Review time goes into arguing about a semver range that was never the cause. Runtime risk goes up when an auto-installed peer is a major version the provider never tested against. Rollback risk goes up when the report that explained the conflict was a rendering quirk, so nobody can reproduce the original failure after the pin lands.

Reading the report first is cheaper than reversing a pin later. A peer report names the peer, the range, the provider, and often the resolution path. None of that requires a version change to interpret. A useful boundary comes from the Claude Code dependency install side effects guide: install-time network and script behavior is a separate topic from reading resolution output. The report itself is where this post stays.

What Peer Dependencies Express

A peer dependency is a declaration that a package works with a specific version range of another package, supplied by the consumer rather than bundled. The provider says “I need host version X”, and the project that installs the provider is responsible for making a satisfying host present. The contract is the whole point: the provider does not choose the host version, the application does.

Three properties of the contract matter when you read a report.

Contract property What it tells you What it does not tell you
Peer range Versions the provider claims to support Whether the provider was tested against each one
Peer presence Whether the host is installed at all Who was supposed to install it
Peer identity Which package name satisfies the role Whether a workspace member or a registry package provides it

The range is a claim by the provider. Presence is a fact about your tree. Identity is a fact about your workspace layout. A report that says a peer is unmet is telling you about presence. A report that says a peer version is incompatible is telling you about the range against the installed identity. Keeping those separate is the first habit of the review.

Read the Peer Report

A peer report has four readable parts. The peer package name, the required range, the package that declares the peer, and the resolution outcome. Read them in that order and most conflicts explain themselves before you touch a manifest.

bash
pnpm why <peer-package>
# shows which packages require the peer and which version is present
pnpm ls --depth 2 <peer-package>
# shows the resolved location of the peer in the tree

The pnpm why command answers the provider question. It lists every package that depends on the peer and the reasons the resolver kept each one. The pnpm ls command answers the presence question for the current tree. Run both before proposing any change, because the provider list can include packages you did not edit in the upgrade that triggered the report.

A useful review table looks like this:

Report line Question it answers Next command
<pkg> has unmet peer <peer>@<range> Presence of the host pnpm why <peer>
<pkg> requires a peer of <peer>@<range> but ... Range against installed identity pnpm ls --depth 2 <peer>
A chain of ... -> <pkg> -> <peer> Who pulled the provider in Read the chain top down
peer dependency ... required during add Policy at install time Check the flags used

None of these lines tell you whether the peer was explicitly declared in your manifest, auto-installed by a setting, or provided by a workspace member. The next section covers that distinction.

Separate Policy from Installation

Peer policy and peer installation are different layers. Policy is what the graph declares and what strictness the command enforces. Installation is whether pnpm adds a missing peer automatically, and which setting authorized that.

Layer Setting or flag What it controls Where it shows up
Peer policy --strict-peer-dependencies Whether an unsatisfied peer fails the command Install and add output
Peer policy --no-strict-peer-dependencies Downgrades a peer failure to a warning Install and add output
Peer policy peerDependencyRules in settings Allowlisted or ignored peer conflicts Resolution report
Installation auto-install-peers Whether pnpm installs missing peers by default Presence of an unexpected peer
Installation --no-auto-install-peers Disables automatic peer installation for that command Presence of a reported unmet peer
Installation --ignore-scripts Skips lifecycle scripts, not peer resolution Unrelated to peer output

Read the matrix as a decision aid. If a peer is present and you did not declare it, check auto-install-peers before assuming someone added it by hand. If a peer conflict fails the command, check the strict flag and any peerDependencyRules entries before assuming the range is wrong. The pnpm CLI documentation for add and peer flags and the settings entry for auto-install-peers are the official references for both layers.

The distinction has a review consequence. A pin changes installation. A peer rule changes policy. Neither one fixes a provider that declared a range it never tested, and neither one is a substitute for deciding which package should supply the peer.

Inspect Workspace Context

Workspaces change the peer story. A workspace member can provide a peer that a registry package would otherwise supply, and the resolver has to decide whether the local member satisfies the range. Such a decision is invisible in a flat report unless you know the workspace layout.

bash
pnpm -r exec pwd
# lists the workspace members the command would touch
pnpm why --depth 3 <peer-package>
# deeper chain shows whether a workspace member is in the path

The question to answer is who provides the peer. A registry package at a pinned version and a workspace member linked into the tree are different facts, and a report line that looks identical can mean either one. Issue pnpm issue #15351 is a community report about peer checks in a workspace context. It is a pointer to a specific scenario, not proof that every workspace reports peer checks the same way.

Provider How it appears in the tree What to confirm
Registry package A version number in the chain The version satisfies the declared range
Workspace member A link to the local path The local member exports the expected surface
Auto-installed peer Present with no matching manifest entry Which setting installed it and whether that was intended
Explicit manifest entry A direct dependency or dev dependency line The declared range is a decision, not an accident

Labeling the provider is the part reviewers skip. A peer supplied by a workspace member can break in a way a registry peer cannot, because the local surface changes with your own code. The Go workspace boundaries guide makes the same separation for Go workspaces: local development composition is not the same contract as a published dependency.

Review Auto-Installed Peers

Auto-installed peers are the ones nobody declared on purpose. When auto-install-peers is on, pnpm can add a missing peer during resolution, and the result is a peer that exists in the lockfile without a corresponding decision in a manifest. Convenience is the upside, and an unreviewed major version entering a tree is the cost.

bash
pnpm why <peer-package>
# a provider chain with no manifest entry suggests automatic installation
git diff -- pnpm-lock.yaml
# shows whether the peer entered with the upgrade that triggered the report

The review question is provenance. Was the peer explicit, automatic, or workspace-provided? A peer that arrived automatically during an upgrade deserves the same scrutiny as a direct dependency, because it can bring its own transitive graph with it. The report will not volunteer this. You have to compare the provider chain against the manifests.

Provenance Signal in the report Review action
Explicit Manifest line for the peer Confirm the declared range is intentional
Automatic Present with no manifest line Check auto-install-peers and decide whether to declare it
Workspace-provided Local path in the chain Confirm the member satisfies the role
Transitive requirement Provider chain includes an indirect dependency Decide whether the indirect is the right owner

Auto-installation is not a defect. It is a default that trades an error for an action. The cost of that trade is visibility, and the fix is to make provenance a review column rather than a guess.

Compare Issue Reports Carefully

One GitHub issue is evidence about one scenario. The pnpm peer diagnostic story includes at least two reports that are easy to overgeneralize, and this section keeps them scoped.

Community, F043: pnpm issue #11439 reports that v11 stopped showing peer dependency details during strict peer failures. The fetched issue says the detailed output was restored through merged PR #11450, and PR #11133 is referenced as part of the diagnostic change. This outcome is verified for that issue only. It does not establish behavior for every pnpm version or every workspace, and a closed issue is not a promise that a given install prints the same lines.

Community: pnpm issue #15351 is a separate report about peer checks and workspace context. It is a pointer to a scenario where workspace membership and peer checking interact. The report is not evidence that every workspace omits the same information.

Reported behavior Source and scope What it does not prove
Strict peer failures hid details in v11 Issue #11439, restored by PR #11450 That every v11 install hides details
A change to referenced diagnostic output PR #11133, referenced from the issue That the change applies to all report modes
Workspace context affects peer checks Issue #15351 That all workspaces report the same way

The honest reading is that diagnostic rendering has changed across versions and the current output of your install is the only report that decides your case. Compare issue reports to your own output rather than to each other. The same discipline appears in the Claude Code regression postmortem guide for framework regressions: a described incident is a pointer, and your environment is the verifier.

Choose a Scoped Resolution

A resolution is scoped when you can name the policy, the provider, and the setting it changes. Three resolution types cover most peer reports, and each one has a different blast radius.

Resolution What it changes When it is the right tool
Declare the peer explicitly Adds a decision to a manifest Your project is the real provider of the role
Adjust a peer rule Changes policy for a named conflict The conflict is known and accepted, and you can document why
Change the strictness flag Changes whether the conflict fails the command A CI gate is too strict for a transitional state
Pin a version Changes which version satisfies a range The range is genuinely wrong for your host version

A pin is the last row for a reason. Pinning is correct when the provider declared a range your host cannot satisfy and you have decided which version to run. Pinning is the wrong tool when the actual problem is an undeclared provider or an automatic installation nobody reviewed, because it hides the structural issue behind a version number.

bash
pnpm add <peer-package>@<decided-version>
# explicit declaration after the provider and range are confirmed
pnpm install
# verify the report no longer names the conflict

The pass condition is concrete: the install succeeds with the policy you intend, and pnpm why shows the provider chain you expect. A green install that still names a conflict you did not read is not a pass. The Claude Code verification guide makes the same demand for agent edits: ask what proves the change, not just what the command printed.

Map the workspace peer providers

The artifact worth keeping from a peer review is a provider map. It lists each peer the report named, who provides it, and how it entered the tree. The map turns a future report from an investigation into a lookup.

Peer Declared by Provided by Provenance Decision
react some-ui-lib your app explicit keep the declared range
typescript some-type-lib workspace tooling workspace-provided confirm the member exports the expected version
@types/node some-node-lib auto-installed automatic declare it or change the setting
rxjs some-observable-lib transitive indirect requirement decide whether the indirect is the right owner

The map works as a contract inventory. Each row is a decision someone made or failed to make. The rows that say automatic or indirect are the rows worth revisiting first, because those are the ones where the tree contains a choice nobody recorded. A provider map also makes the workspace conversation concrete. When a member is the provider, changing that member is a change to the peer contract for everyone who consumes it. The TypeScript project references guide covers the same ownership discipline for build graphs: map who owns a boundary before moving code across it.

Reviewing a peer change with Claude Code

Give the agent three inputs: the peer and provider from the report, the commands it may run, and the definition of done. Read-only investigation first. Ask for pnpm why on the peer, a provider chain, and a statement of which setting explains the outcome. Edits come after the report is read, not before.

bash
pnpm why <peer-package>
# ask for this before any manifest edit
pnpm ls --depth 2 <peer-package>
# ask for the resolved location next

Review the agent’s provider claim against your own tree. The agent can read the report accurately and still propose a pin, because a pin is the shortest path to a green install. Deciding whether a pin is the right resolution is a dependency decision, and the reviewer owns it. The Claude Code cost per verified change guide is the relevant lens for how much investigation a small peer fix deserves: a read-only report is cheap, a wrong pin is not.

A peer fix that touches many manifests at once is worth pausing on. The Claude Code overengineering guide describes the pattern where a small request turns into a wide change. Peer policy is usually a one-row decision.

The concrete win, loss, and implication

The concrete win is a resolution you can defend. When someone asks why a peer version changed, the answer is a named provider, a named setting, and a report line that justified it. An answer like that survives review and the next upgrade, because the reasoning is written down rather than carried in someone’s memory.

The concrete loss is that diagnostic rendering is a moving target. Issue #11439 is real evidence that the shape of a peer report changed between versions, and a runbook written against one version’s output can mislead on another. The provider map and the provenance column age better than the exact report lines, because they describe the graph rather than the printer.

The practical implication is that peer reports are graph evidence, not version instructions. Teams that read the provider chain before pinning spend less time reversing resolutions. Teams that pin on the first red line keep rediscovering the same conflict under a different version number.

Checklist before you resolve a peer conflict

Check Pass condition If it fails
Peer and range identified The report line names both Re-run the install and capture the full output
Provider chain read pnpm why output names every requirer Run pnpm why before editing
Policy layer identified Strict flag or peer rule named Check the command flags and settings
Installation layer identified Auto-install behavior named Check auto-install-peers
Provenance labeled Explicit, automatic, or workspace-provided recorded Compare the chain against the manifests
Workspace context checked Member providers identified Run the report with workspace scope
Resolution scoped The change names the layer it edits Choose a resolution type before editing
Pass condition defined Install succeeds and the report is clean Do not merge on a green command alone
Evidence map separating peer policy, automatic peer installation, workspace provision, and diagnostic rendering as four distinct review questions.
Editorial evidence map based on F043 and F044. Issue #11439 reports a specific pnpm v11 diagnostic regression and a merged restoration; treat it as scoped evidence, not a rule for every project.

What the evidence does and does not say

The evidence behind this post is deliberately narrow. F043 is a community report about one issue and the merged PR that restored its output. F044 is a derived review framework built on the official CLI and settings documentation. Neither fact is a claim about pnpm being safer or less safe than another package manager, and nothing here should be read as a package-manager comparison.

No benchmark, install-time measurement, or resolution-time number is reported, because none was measured. A peer conflict is a resolution fact, not a performance result. Any future post that quantifies how peer auto-installation affects install time would need a fixed registry snapshot and a measured pass, and no such data was collected here.

The distinction between reading a report and judging a lockfile matters too. This post does not turn peer diagnostics into lockfile safety guidance. Integrity, provenance, and supply-chain verification are separate topics, and the report is only one input among many for those decisions.

Workflow from reading a peer report through identifying policy and installation layers, checking workspace provenance, and choosing a scoped resolution.
Editorial workflow based on F044. The sequence is a review routine; the exact commands and output lines depend on the pnpm version and the workspace layout.

Data gap and future update

The pnpm CLI add page and the auto-install-peers settings entry are the official references used here, and the exact flag names and defaults should be rechecked against the current documentation before relying on a fine detail. Community PRs #11133 and #11450 are referenced from the fetched issue, and the PR pages themselves were not independently fetched in the research pass.

No evidence was found or invented for how peer diagnostic rendering behaves in every pnpm version. A future update could produce a version-by-version rendering table, but that would need a measured matrix across releases and no such matrix was built. Issue #15351 is a single report about workspace context, and a broader study of workspace peer reporting would need more reports or an official statement.

Tradeoff between a fast version pin that turns a report green and a scoped resolution that names the policy, provider, and setting behind the conflict.
Editorial tradeoff diagram based on F044. A pin is sometimes right, but it is the last tool in the list because it hides structural problems behind a version number.

Peer resolution is one boundary in a wider set this batch covers. Gradle Constraints vs Dependencies covers influencing a version without adding a graph edge, which is the same separation of policy from installation in a different ecosystem. Gradle Capability Conflicts covers competing components declaring the same capability, a cousin of the peer identity question. Gradle Variant Attributes covers matching a consumer to the right artifact.

Optional and transitive expectations appear in Maven Optional Dependencies, which keeps transitive expectations explicit, and in Cargo Feature Unification, which maps feature activation across a selected package set. NuGet Central Package Management covers centralizing versions across projects, and Go Module Graph Pruning explains indirect dependency entries in Go’s graph.

Workspace membership as a dependency question is covered in Go Workspace Boundaries and Cargo Workspace Inheritance. Generated-client boundaries from JavaScript tooling appear in OpenAPI Generator Customization and GraphQL Code Generator Client Presets.

More from this batch

One AI API Key option for OpenAI-format agents

Claude Code uses an Anthropic-format route, so the One AI free model IDs are not a Claude Code model source. The packet records Claude IDs as unavailable on 2026-11-27.

OpenAI-format agents have a separate path: One AI API Key offers https://api.oneaiapikey.com/v1, one key, and 46 live free IDs. Free IDs are a different client and request format, not a workaround for Claude Code authentication. Check the free model list before choosing an agent route, or read the quickstart for the request shape.

FAQ

A peer conflict fails my install. Should I pin the peer?

Not first. Read the report for the provider chain and the setting that made the conflict fail. Pinning is the right resolution when the declared range genuinely does not match your host version and you have decided which version to run. When the actual problem is an undeclared provider or an automatic installation, a pin hides the structural issue.

How do I tell whether a peer was auto-installed?

Compare the provider chain from pnpm why against your manifests. A peer that is present in the tree with no matching manifest line was likely added by automatic installation. Check the auto-install-peers setting to confirm which default applied to the command that produced the report.

Does issue #11439 mean every v11 install hides peer details?

No. Issue #11439 is a report about a specific scenario, and the fetched issue says PR #11450 restored the detailed output. The outcome is verified for that issue. Your install and version are the verifier for your own case, so compare your output to the issue rather than assuming either direction.

Is pnpm’s peer handling safer than other package managers?

This post does not make that claim. Peer policy and peer installation are documented behaviors of pnpm, and reading them well is a review skill. A safety comparison across package managers would need evidence this post does not have, and the guardrails for this topic explicitly exclude package-manager safety rankings.

What proves a peer resolution is complete?

Two conditions. The install succeeds under the policy you intend, and pnpm why on the peer shows the provider chain you expect with a provenance label for each provider. A green command that still names a conflict you did not read is not a pass.

More Claude Code troubleshooting

Sources

Control checklist covering peer identification, provider chain review, policy and installation layers, provenance labels, and a scoped resolution decision.
Editorial control checklist derived from F043 and F044. Passing the checklist shows the report was read honestly; it does not certify that the resolved graph is correct at runtime.
Verdict that reading the provider chain and provenance before pinning produces a resolution you can defend in review.
Editorial verdict based on F043 and F044. A peer report is graph evidence. Read the provider chain before changing a version.
More in Blog

Try it

One API key for GPT, Grok, DeepSeek, Kimi, GLM, MiniMax, Qwen, Step, Beam, Nemotron, ERNIE, Hunyuan, Gemma, Laguna, LFM, LongCat, Llama, Solar, Jais, Mistral, K2 and Roleplay.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.

New accounts$10 credit on sign-up
Claim $10 credit →