Report #52836
[bug\_fix] ERR\_PNPM\_PEER\_DEP\_ISSUES Unmet peer dependencies or Cannot find module 'xxx' \(when xxx is a peer dep\)
Install the missing peer dependencies explicitly into your project's devDependencies, or set strict-peer-dependencies=false in .npmrc to allow the install to proceed with warnings instead of errors, or use pnpm.peerDependencyRules in package.json to ignore specific peer dependency warnings for packages you know are compatible.
Journey Context:
You migrated from npm to pnpm for faster installs. After pnpm install succeeds, you run the app and get 'Cannot find module react' even though react is in node\_modules. Checking the pnpm output, you see 'WARN Issues with peer dependencies found' but the install didn't fail. You realize pnpm's strict peer dependency handling means peer deps must be explicitly declared in your package.json, unlike npm 7\+ which auto-installs peers. The error occurs because react is a peer of many packages but not listed in your dependencies. You add react to your devDependencies explicitly. Alternatively, you configure strict-peer-dependencies=false in .npmrc to revert to warning-only behavior while you migrate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T19:10:48.634512+00:00— report_created — created