pnpm vs bun install vs npm: which package manager to pick in 2026
pnpm vs bun install vs npm in 2026: install speed, disk cost, and CI minutes for small teams that count every rupiah.
The 90-second install that quietly costs you a morning
Run npm install on a fresh clone of a medium React app over the office Indihome line in Karawaci, and you can walk to the Alfamart on Jalan Boulevard Diponegoro, buy a coffee, and come back before it finishes. That gap is the whole reason pnpm vs bun install vs npm is still a live argument in 2026, not a settled one. The tools have converged on features. Where they still split is install speed, disk footprint, and how many CI minutes they burn — and for a small team, those three things are money.
I’ve shipped production apps with all three in the last year. Here’s the practical read, not the benchmark-chart read.
Comparison table
| Dimension | npm (v11) | pnpm (v10) | bun install |
|---|---|---|---|
| Cold install speed | Baseline (slowest) | ~2x faster | ~3-4x faster |
| Warm/cached install | Slow | Very fast | Fastest |
| Disk per project | Full copy every project | Shared store (hardlinks) | Full copy, but fast |
| node_modules layout | Flat (allows phantom deps) | Strict (symlinked) | Flat |
| Monorepo workspaces | Works, basic | Excellent | Good |
| Runtime coupling | None | None | Optional (Bun runtime) |
| Ecosystem trust | Universal | Very high | High, still catching edges |
npm: the one that’s always already there
npm ships with Node, so it’s the zero-decision default. On a machine you don’t control — a client’s CI, a junior’s laptop from the warnet down the road, a Dockerfile someone wrote in 2022 — npm just runs. No install step, no version negotiation.
That’s its real value in 2026: universality, not performance. Every tutorial, every Stack Overflow answer, every postinstall script assumes npm first. If your team churns through junior devs or hands projects to clients who’ll maintain them later, npm is the safe handover.
The cost is speed and disk. npm copies a full node_modules into every project. Ten Next.js projects on one laptop is ten near-identical node_modules, each 300-500MB. On a 256GB MacBook Air — the machine a lot of Indonesian juniors actually own — that adds up fast. npm’s cache helps on reinstall, but a cold install is still the slowest of the three.
pnpm: the boring, correct default
pnpm is what I reach for on new projects now. Its trick is a content-addressable store: a package version is downloaded and stored once, globally, then hardlinked into each project. Fifteen projects that all use React 19? One copy on disk, shared. On a shared team laptop or a cheap VPS where you build several apps, the disk saving is not theoretical — it’s gigabytes.
The second thing pnpm gets right is strictness. Its node_modules only exposes what you actually declared in package.json. npm’s flat layout lets a package import a transitive dependency it never listed — works on your machine, breaks the day that dependency gets bumped. pnpm refuses that upfront. For a small team without a dedicated platform engineer, catching phantom dependencies at install time instead of in a production incident is worth the mild adjustment.
# Enable pnpm via corepack — no separate install, ships with Node
corepack enable
corepack prepare pnpm@latest --activate
# Install is a straight swap
pnpm install
pnpm add react
pnpm --filter web dev # run a script in one workspace package
The friction: some tools still assume node_modules is flat, and a rare package with a lazy postinstall will trip over pnpm’s symlinks. It’s rare in 2026, and there’s an escape hatch (node-linker=hoisted) for the one legacy dependency that fights you.
bun install: the fast one, used carefully
bun install is the fastest package manager I’ve measured, full stop. On a warm cache it’s borderline instant; on cold installs it’s roughly 3-4x quicker than npm. It reads your existing package.json and writes a bun.lock. You don’t have to adopt the Bun runtime to use it — and that distinction is the whole point.
# Just the installer — keep deploying on Node if you want
bun install
bun add zod
# Note: `bun install` (package manager) is separate from
# running your app under the Bun runtime. Use one, both, or neither.
Here’s how I actually deploy it: bun install in CI to cut minutes, app still running on Node in production. That combination is boring and reliable now. Where I stay cautious is native addons and unusual postinstall scripts — occasionally one behaves differently under Bun, and the fix is to install that single package with npm. It happens far less than it did two years ago, but budget an afternoon for it on a dependency-heavy project before you commit your CI to it.
Verdict
Pick npm if: you’re handing the project to a client or a rotating cast of juniors, the repo has to run on machines and pipelines you don’t control, and install speed genuinely isn’t your bottleneck. Universality beats speed here.
Pick pnpm if: it’s a monorepo, or several projects share one laptop or VPS, or you want strict dependency hygiene without hiring for it. This is my default recommendation for a new small-team project in 2026 — fast enough, disciplined, and nothing exotic to explain to the next hire.
Pick bun install if: CI minutes on a capped free tier are your real pain, or cold installs are slowing every push. Use it as the installer even while you deploy on Node, and keep npm in your back pocket for the one package that argues with it.
One rule matters more than the choice: never let two lockfiles live in the same repo. A stray package-lock.json next to a pnpm-lock.yaml means your laptop and your CI resolve different versions, and you ship a bug that only shows up in production. Pick one, delete the rest, add the unused lockfiles to your lint’s forbidden-files list, and move on. The package manager is a tool, not a religion — the lockfile discipline is the part that actually keeps you out of trouble.
Ditulis oleh Asti Larasati