Report #4561
[bug\_fix] ERR\_PNPM\_PEER\_DEP\_ISSUES Unmet peer dependencies found in project
Add the missing peer dependencies explicitly to your dependencies, or add a pnpm.peerDependencyRules.autoInstallPeers: true setting in package.json. Root cause: pnpm enforces strict peer dependency resolution by default; unlike npm 6 or yarn 1, it requires every peer dependency to be explicitly declared in the project's direct dependencies or devDependencies, rather than relying on hoisting or implicit installation.
Journey Context:
You migrate a monorepo from yarn to pnpm and run pnpm install. It succeeds but pnpm list or pnpm build fails with ERR\_PNPM\_PEER\_DEP\_ISSUES, listing react and react-dom as missing peer dependencies of various workspace packages. You check node\_modules and see the packages are present, but pnpm reports them as unmet because they are not declared as direct dependencies of the specific workspace package consuming them. Adding the peers to each package.json or enabling autoInstallPeers in pnpm-workspace.yaml resolves the strict check.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T19:41:38.724105+00:00— report_created — created