npm/pnpm/yarn
pnpm Commands
Use pnpm for faster, disk-efficient package management. pnpm uses a content-addressable store and strict node_modules, preventing phantom dependencies and saving disk space.
4 commands
Pro Tips
pnpm's strict node_modules prevents importing undeclared dependencies — catches issues that npm and yarn miss.
Use 'pnpm dlx' instead of 'npx' to run one-off packages — same functionality with pnpm's speed.
pnpm store is shared across projects. Use 'pnpm store prune' to clean unused packages and reclaim disk space.
Common Mistakes
Some packages break with pnpm's strict node_modules. Use 'shamefully-hoist=true' as a last resort in .npmrc.
pnpm uses a different lockfile (pnpm-lock.yaml). Don't mix it with package-lock.json in the same project.