pnpm trades a bit of compatibility surface for huge wins in disk and strictness. These rules keep the trade favorable.
Pin pnpm version with packageManager in package.json. Different pnpm versions can produce different lockfiles. Pinning eliminates 'works on my machine' caused by version drift.
Use --frozen-lockfile in CI. Same role as npm ci — strict, fast, fails on lockfile drift.
Run pnpm store prune occasionally. The global store accumulates packages no project references anymore. Pruning monthly reclaims gigabytes.
Allow lifecycle scripts only for trusted packages. v10 blocks lifecycle scripts by default — that's the right default. Use pnpm.allowedDeprecatedVersions and pnpm.onlyBuiltDependencies in package.json to opt-in for packages that genuinely need them (e.g. esbuild, sharp).
Embrace the strictness. When pnpm complains about a missing dep, fix the dep — don't fight pnpm. Every error pnpm catches is a future production bug avoided.