Have you ever waited 5 minutes for npm install
? Or discovered your node_modules folder eating 2GB of disk space across 20 projects? pnpm fixes both of these problems that drive developers insane.
Released in 2016, pnpm uses a content-addressable storage system where packages are stored once globally and linked to projects. When you install lodash in 100 projects, pnpm stores it only once on disk and creates hard links to each project's node_modules. No more copying the same damn files over and over.
How pnpm Fixes npm's Biggest Problems
Unlike npm and Yarn Classic that copy the same packages over and over, pnpm's non-flat node_modules structure prevents the "phantom dependencies" problem that bites you in production. Each package can only access dependencies it actually declares in package.json. This catches dependency issues during development instead of when your app crashes at 3am.
The downside? pnpm's symlinks break some IDEs and debuggers. VS Code sometimes can't resolve imports correctly, and you'll spend time figuring out if it's a real dependency issue or just your editor getting confused by the symlink maze.
Real Performance Numbers
In my testing, pnpm is way faster than npm. Like stupidly faster:
- Clean installs: 2-3x faster than npm
- Cached installs: happen in under a second vs npm's forever
- Disk usage: about half the space
Your results depend on project size and how many shared dependencies you have. The more overlap between projects, the bigger pnpm's advantage gets.
Who Actually Uses This
Microsoft's Rush team recommends pnpm for monorepos with hundreds of projects because it handles phantom dependencies better than npm. Rush supports all three package managers, but their docs basically say "use pnpm if you want your builds to be predictable."
Current sponsors include Discord, Vite, Stackblitz, and Vercel - companies that deal with massive JavaScript codebases and got tired of waiting for npm.
Monorepo Support That Actually Works
pnpm includes built-in workspace support so you don't need to cobble together Lerna + npm + whatever else. Create a pnpm-workspace.yaml file and you get dependency hoisting controls, workspace protocols, and shared version management.
The workspace catalogs feature lets you define dependency versions once and reuse them across packages. No more hunting down every package.json to update React.