Report #103735
[bug\_fix] pnpm WARN ... requires a peer of ... but none is installed
Install the missing peer dependency explicitly in the workspace root or consuming package, or set \`auto-install-peers=true\` in \`.npmrc\`. pnpm is stricter than npm 7\+ by default: it warns about peer dependencies instead of automatically installing them. Adding the peer to \`devDependencies\` satisfies the constraint and makes the dependency graph explicit.
Journey Context:
You migrate a monorepo from npm to pnpm. \`pnpm install\` succeeds, but at runtime React components throw because \`react\` is not resolvable from a shared UI package. The install log had warnings about unmet peer dependencies, which npm 7 had silently auto-installed. You read the pnpm \`.npmrc\` options and learn that pnpm historically does not auto-install peers. You either add \`react\` and \`react-dom\` to the UI package's \`devDependencies\` or enable \`auto-install-peers=true\`. After that, the workspace resolution matches what npm users expect.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-13T04:36:44.748738+00:00— report_created — created