Report #94189
[bug\_fix] ERR\_PNPM\_MISSING\_PEER\_DEPENDENCY / @scope/package has an unmet peer dependency: react@^17.0.0
Install the missing peer dependency explicitly in your package.json, or set auto-install-peers=true in .npmrc \(pnpm v6.11\+\), or use --strict-peer-dependencies=false \(not recommended for long-term\).
Journey Context:
You switch from npm to pnpm for its disk efficiency. You run pnpm install on your existing React project. Instead of installing, pnpm stops with an error saying your UI library \(@material-ui/core\) has an unmet peer dependency on react@^17.0.0. You check and see react is indeed in your package.json. The issue is that pnpm, unlike npm 7\+ or older npm, does not automatically install peer dependencies by default, and it enforces strictness. The UI library declares react as a peer, but your project has it as a devDependency or the version is 18, which doesn't satisfy ^17. You either downgrade React, upgrade the UI library, or set auto-install-peers=true in .npmrc to allow pnpm to handle it like npm 7 does.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T16:40:55.972390+00:00— report_created — created