pnpm (Performant npm)

pnpm (“performant npm”) is a package manager for JavaScript whose central idea is that a given version of a package should exist only once on disk, no matter how many projects use it. Its own documentation explains that instead of storing 100 copies of a dependency across 100 projects, files are kept once in a content-addressable store and shared. When a dependency updates, only the changed files are added to the store.

The savings come from hard-linking. Rather than copying files into each project’s node_modules, pnpm hard-links them from that single store, so the files in a project “consume no additional disk space.” This makes installs faster and dramatically reduces total disk usage across many projects on the same machine.

pnpm also lays out node_modules differently from npm and Yarn Classic. Those tools “hoist” packages to the top of node_modules, which lets code reach packages it never explicitly depended on. pnpm instead, by default, uses symlinks to add only a project’s direct dependencies to the root of the modules directory, keeping transitive dependencies in a structured .pnpm directory. This prevents accidental access to packages a project did not declare.

Together these choices make pnpm a notably stricter and more space-efficient member of the same JavaScript ecosystem as npm and Yarn, while remaining compatible with the npm registry.

Sources

Last verified June 8, 2026