pnpm Flags & Options
Disk-efficient Node.js package manager.All pnpm pages
- pnpm -r (--recursive): run a command in every workspace packagepnpm -r run build runs a script in every workspace package in dependency order. Root package, concurrency, --parallel, --filter, --no-bail and common pitfalls.
- pnpm install --frozen-lockfile: never update pnpm-lock.yaml (CI default)pnpm install --frozen-lockfile never updates pnpm-lock.yaml and fails with ERR_PNPM_OUTDATED_LOCKFILE; it is on by default in CI. Related options and fixes.
- pnpm install --prod (-P): install only production dependenciespnpm install --prod (-P) installs dependencies without devDependencies, also implied by NODE_ENV=production. --dev, prune --prod, pnpm deploy and Docker tips.
- pnpm install --shamefully-hoist: a flat node_modules for tools that need itpnpm install --shamefully-hoist links every transitive dependency into the root node_modules like npm. Cannot find module fixes, hoist patterns, node-linker.