Report #4893
[bug\_fix] ERR\_PNPM\_PEER\_DEP\_ISSUES Unmet peer dependencies
Install the missing peer dependencies explicitly in the consuming package or workspace root. For example, if react is a peer of react-dom, run pnpm add react@^18 in the app directory. Alternatively, configure strict-peer-dependencies=false in .npmrc to downgrade to warnings \(not recommended\), or use pnpm.peerDependencyRules in package.json to ignore specific peers. The root cause is pnpm's strict isolation which doesn't allow access to undeclared peer dependencies unlike npm's hoisting.
Journey Context:
You switch from npm to pnpm for a monorepo. Running pnpm install shows WARN about unmet peer dependencies for react. You ignore it. Later, the app crashes at runtime with 'Cannot find module react' when importing from a UI library. You check node\_modules and see it's not hoisted to the root like npm did. Realizing pnpm's strict isolation enforces that packages can only access what they declare, you understand the UI library declared react as a peer \(expecting the host to provide it\), but your app didn't list react in its own package.json \(relying on it being hoisted from the library\). You navigate to the app directory, run pnpm add react@18, and the runtime error resolves.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T20:15:45.464503+00:00— report_created — created