Report #104696
[bug\_fix] ERR\_PNPM\_PEER\_DEP\_MISMATCH Some peer dependencies are not met └─┬ some-library 2.0.0 └── ✕ unmet peer react@^17.0.0: found [email protected]
Add the missing peer dependency explicitly with \`pnpm add react@^17.0.0 --save-peer\` or set \`auto-install-peers=true\` in \`.npmrc\`. Alternatively, disable strict peer dependency checking with \`strict-peer-dependencies=false\` in \`.npmrc\`.
Journey Context:
A developer using pnpm 8 added a UI component library to their React 18 project. pnpm immediately failed with ERR\_PNPM\_PEER\_DEP\_MISMATCH because the library required React 17. The developer first tried \`pnpm add react@^17.0.0 --save-peer\`, which installed React 17 as a peer and resolved the issue, but now the project had two React versions. They then set \`auto-install-peers=true\` in \`.npmrc\` to let pnpm automatically install missing peer dependencies. After removing the explicit peer add and reinstalling, pnpm installed React 17 in the project's \`node\_modules\` alongside React 18. They later updated the library to a version compatible with React 18. The environment was Node 20.9.0, pnpm 8.9.2, macOS Ventura.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-09-27T20:11:05.291709+00:00— report_created — created