pnpm: ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies
ERR_PNPM_PEER_DEP_ISSUES Unmet peer dependencies: react-dom@^18.0.0 is missing from peerDependencies of package-name.
Immediate Remediation
bash
echo 'auto-install-peers=true strict-peer-dependencies=false' >> .npmrc && pnpm install
Root Cause Analysis
pnpm v8+ enforces peer dependency resolution by default, so packages requiring peers like react-dom that aren't explicitly installed cause the install to fail. Setting auto-install-peers and strict-peer-dependencies=false relaxes the validation and auto-installs missing peers.
Verification & Guardrails
- Only disables strictness for existing projects; update package.json peerDependencies if the library requires a specific version.
- Verify the peer version matches your installed version to avoid runtime errors (e.g., React 18 vs 19).
- If the issue persists, run `pnpm install --force` to refresh the dependency graph.
Have a custom or uncategorized crash?
Run your trace through our in-memory client privacy sandbox for instant SRE remediation.