pnpm: fast, disk-efficient Node package manager with strict, deterministic deps
P

pnpm: fast, disk-efficient Node package manager with strict, deterministic deps

pnpm: fast, disk-efficient Node package manager with strict, deterministic deps

35,654 stars
N/A forks
N/A contributors

README

Project documentation from GitHub

pnpm: The Fast, Disk-Efficient Package Manager You Probably Haven't Tried Yet

If you've been using npm or Yarn for a while, you've probably felt the pain of node_modules bloat. Every project clones the same dependencies over and over, eating up disk space and slowing down installs. Enter pnpm, a drop-in replacement that's fast, strict, and surprisingly clever about how it handles dependencies.

pnpm isn't new, but it's been quietly getting better. It's not just "npm but faster" — it changes the fundamental approach to how packages are stored and linked. The result? Install speeds that make you question why you ever waited for npm install in the first place.

What It Does

At its core, pnpm is a package manager for Node.js. You can use it the same way you'd use npm or Yarn: pnpm add, pnpm install, pnpm run. But under the hood, it uses a content-addressable file system to store all packages in a global store on your machine. Then, it uses hard links and symlinks to make those packages available inside your node_modules without duplicating them.

The result: you only download a package once, ever. If you have 10 projects using lodash, pnpm stores one copy and links to it from each project. That's a huge win for disk space.

Why It's Cool

Disk efficiency. This is the headline feature. With npm or Yarn, every npm install in a new project copies all your dependencies from scratch. With pnpm, the same package across projects shares a single copy on disk. I've seen projects shrink from 200MB to under 50MB on repeated installs.

Strict, deterministic deps. pnpm enforces a strict node_modules structure. It doesn't flatten dependencies like npm does. Every package only gets access to its explicitly declared dependencies, which means no accidental "barely works because a transitive dep happened to be hoisted" bugs. This sounds like a downside, but it actually makes your dependency tree more predictable and your package.json more honest.

Fast installs. Because pnpm reuses the global store, installs are dramatically faster, especially for things like CI or when you switch branches. In practice, pnpm install on an existing project is nearly instant if the store is warm.

No hoisting nightmares. You know the "phantom dependency" problem? Where your code uses a package that's not in your package.json but it happens to be installed because some other dependency pulled it in? pnpm kills that dead. Your code can only use what you explicitly declared. This is a lifesaver for team projects.

How

Did you like this issue?

Join our weekly newsletter

Love discovering amazing projects?

Help us continue bringing you the best open-source discoveries every week.

Back to Projects
Last updated: Jun 14, 2026