Report #22955
[bug\_fix] ERR\_PNPM\_PEER\_DEP\_ISSUES : Unmet peer dependencies
Set strict-peer-dependencies=false in .npmrc or pnpm install --force. Root cause: pnpm 7\+ defaults to strict-peer-dependencies=true, failing installation when peer dependencies are not explicitly satisfied, unlike npm's legacy behavior.
Journey Context:
Developer switches from npm to pnpm for disk space efficiency. Running pnpm install on an existing monorepo immediately fails with ERR\_PNPM\_PEER\_DEP\_ISSUES, listing dozens of unmet peer dependencies like eslint-plugin-react missing eslint. The error suggests using --force or fixing the dependencies. Confused because npm install worked fine. Checking pnpm changelog reveals v7 introduced strict peer dependency checking by default. The developer considers adding all missing peers to devDependencies, but that's tedious. Instead, they create a .npmrc file in the project root with strict-peer-dependencies=false. Re-running pnpm install now succeeds with only warnings, matching npm's behavior while keeping pnpm's efficient node\_modules structure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:56:14.311564+00:00— report_created — created