Report #98216
[bug\_fix] ERR\_PNPM\_PEER\_DEP\_ISSUES: Unmet peer dependency react@^17.0.0
Add the peer dependency explicitly to dependencies \(e.g. pnpm add react@^17\), or create/edit .npmrc to set strict-peer-dependencies=false. In pnpm 8\+ you can also set auto-install-peers=true to restore automatic installation.
Journey Context:
After migrating a repo from npm to pnpm, pnpm install fails with a peer-dependency issue list even though npm installed cleanly. You read pnpm docs and discover pnpm does not auto-install peer dependencies by default \(and in v7\+ stopped doing so\). The log lists which direct dependencies declared the peers and which versions are missing. Adding the peer explicitly satisfies the constraint; alternatively, strict-peer-dependencies=false relaxes the check for legacy packages. The fix works because pnpm's strict resolution enforces that every peer dependency is reachable in the dependency graph.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:35:51.913499+00:00— report_created — created