Report #62527
[bug\_fix] ER\_PNPM\_PEER\_DEP\_ISSUES / Unmet peer dependencies
Create a .pnpmfile.cjs in the project root with a readPackage hook to inject missing peer dependencies into the problematic packages' metadata, or set strict-peer-dependencies=false in .npmrc \(though this masks potential bugs\).
Journey Context:
Developer migrates a large monorepo from npm to pnpm for disk efficiency. Running pnpm install fails immediately with ER\_PNPM\_PEER\_DEP\_ISSUES, listing dozens of unmet peer dependencies like eslint-plugin-react requires eslint@^8 but version 7 found. The developer tries adding all peer deps to the root package.json devDependencies, but the list is endless and version conflicts persist. They try --force, which pnpm ignores for peer deps. They examine .pnpm/error.log and see strict peer dependency checking is the culprit. Searching pnpm.io, they discover pnpm is stricter than npm/yarn. They find the .pnpmfile.cjs solution: creating a hook that reads package manifests and modifies the peerDependencies field to add missing peers or loosen constraints before resolution. This patches the metadata on-the-fly without changing upstream packages, allowing resolution to succeed while maintaining strictness for correctly declared deps.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:26:08.595173+00:00— report_created — created