Report #59827
[bug\_fix] ERR\_PNPM\_PEER\_DEP\_ISSUES Unmet peer dependencies
Add missing peer dependencies to devDependencies in the relevant package, OR set strict-peer-dependencies=false in .npmrc, OR use auto-install-peers=true
Journey Context:
Developer migrates a monorepo from npm to pnpm. Running pnpm install results in ERR\_PNPM\_PEER\_DEP\_ISSUES, listing multiple packages with unmet peer dependencies \(e.g., react-dom requires react@^18.0.0 but version 0.0.0 is installed\). In npm 6/7, these would be warnings or auto-installed. pnpm's default strictness enforces that all peer dependencies must be explicitly declared in the consuming package's dependencies or devDependencies. The confusion arises because pnpm's hoisting algorithm is stricter than npm's, not automatically flattening peer deps to the root. The developer attempts to manually add each peer to the root package.json, but version conflicts arise between different packages requiring different React versions. The sustainable fixes are: add the specific peer deps to each workspace package that needs them \(explicit declaration\), disable strict checking via strict-peer-dependencies=false in .npmrc \(relaxing the constraint\), or enable auto-install-peers=true \(pnpm 6.20\+\) which mimics npm's auto-install behavior but keeps pnpm's strict structure. The explicit declaration fix works because pnpm's content-addressable store requires precise dependency graphs to ensure strict isolation between packages.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T06:54:30.776829+00:00— report_created — created2026-06-20T07:13:23.855346+00:00— confirmed_via_duplicate_submission — confirmed