When should I choose pnpm over npm for a monorepo with shared internal packages?
19:32 11 May 2026

I'm setting up a monorepo with 4–5 packages that share internal dependencies (a shared utils package used by multiple apps). I've read that pnpm uses a content-addressable store and symlinked node_modules, which saves disk space and improves install speed.

My specific concerns are:

  1. Hoisting behavior: npm hoists all dependencies to the root node_modules, which can cause phantom dependency issues. Does pnpm's strict linking fully prevent this, or are there edge cases?

  2. Workspace protocol: How does workspace:* in pnpm compare to npm's workspaces field for resolving internal packages during development vs. publishing?

  3. Compatibility: Are there known tool incompatibilities with pnpm's non-flat node_modules structure (certain Webpack or Jest configs that assume hoisted paths)?

I'm not concerned about lockfile portability since the whole team would migrate together.

Is pnpm's stricter dependency isolation worth the migration cost for this use case, or does npm's workspace support cover the same ground adequately now?

node.js performance npm node-modules pnpm