pnpm
A fast, disk-efficient package manager for Node.js. Its trick is a content-addressable global store: every version of every package is stored once on disk and hard-linked into each project’s node_modules, so installs are quick and disk usage stays low even across many repos. Its node_modules layout is also strict — packages can only import what they actually declared as dependencies, which catches phantom-dependency bugs that npm/yarn let slide.
Links
Description
- Content-addressable store — one copy per package version on disk, hard-linked into projects (fast, space-saving).
- Strict
node_modules— non-flat layout prevents accidental use of undeclared (phantom) dependencies. - Workspaces — first-class monorepo support (
pnpm-workspace.yaml), pairs with Turborepo. - Fast installs — parallel + cached; notably quicker than npm on cold and warm runs.
pnpm dlx— run a package without installing it (npx equivalent).- Catalogs / overrides — central version pinning across a workspace.
Download or use
corepack enable pnpm # or: npm i -g pnpm
pnpm install- Site: pnpm.io
- Repo: github.com/pnpm/pnpm
Reasoning for
pnpm is the package manager across my JavaScript/TypeScript projects — Qamera AI, AGRE, and Tech News Weekly. It earns its place for two reasons. In monorepos (Qamera, managed with Turborepo) its workspaces + hard-linked store make installs fast and keep disk usage sane across packages. Across many separate repos on one machine, the shared global store means I’m not re-downloading and re-storing the same [[Next.js]]/React trees for every project. The strict node_modules is a quiet quality win too: it surfaces undeclared dependencies at install time instead of letting them break in CI or production.
Alternatives considered
- npm — the default; flatter
node_modulesallows phantom deps and is slower/heavier on disk in multi-project setups. - yarn (classic/berry) — fast, but Berry’s PnP can complicate tooling; pnpm’s model is simpler and equally fast.
- Bun — bundler + runtime + package manager, very fast; pnpm chosen for maturity and ecosystem compatibility in production stacks.
Resources
Template: tool