Report #61162
[bug\_fix] ERR\_PNPM\_PEER\_DEP\_ISSUES Unmet peer dependencies
Create .pnpmfile.cjs with readPackage hooks to inject missing peer dependencies automatically, add the peers explicitly to devDependencies, or set strict-peer-dependencies=false in .npmrc. Root cause: pnpm strictly enforces peer dependency contracts by default, failing installation if any peer dependency is not satisfied by the project's direct dependencies, whereas npm warns and yarn may auto-install.
Journey Context:
Migrating a monorepo from npm to pnpm 8. Running pnpm install on a React 17 project using eslint-config-react-app. Installation halts with ERR\_PNPM\_PEER\_DEP\_ISSUES listing 'eslint-plugin-react' and 'eslint' as unmet peers of eslint-config-react-app, despite them being transitive dependencies. Checking pnpm.io documentation reveals pnpm's strict-peer-dependencies defaults to true in v8, unlike npm's lenient warning behavior. Attempting to manually add each peer to devDependencies works but creates maintenance burden for transitive chains. Creating a .pnpmfile.cjs with a readPackage hook to automatically inject missing peer dependencies into the package manifest during resolution. Alternatively, adding strict-peer-dependencies=false to .npmrc allows installation with warnings only, matching npm behavior.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T09:08:47.344608+00:00— report_created — created