Home

WTF is PNPM?

Is PNPM just NPM with another P? Yes. But also, no.

PNPM stands for Performant NPM, which means it stands for performant node package manager.

That may lead you to the question I asked when I first heard about PNPM: Is it just another NPM alternate?

In a way, yes. It's like Yarn in that it is a command-line tool that helps you manage JavaScript project dependencies using the NPM registry. And, like Yarn, it's much much faster than plain old NPM.

Why not just use NPM?

Is it really a good idea to use an NPM alternative when the default (NPM) actually works fine, but is maybe a bit slow?

Generally speaking, I'd say no, not necessarily! There's a ton of value in using the ubiquitous option — which, unlike the word ubiquitous, is the one people best understand and are most comfortable using.

But there are two scenarios in which I'd welcome a change:

When NPM's performance becomes an issue, I'd likely first switch to Yarn. Yarn has significant performance improvements over NPM, and it's a more popular and accepted option when compared to PNPM.

And if your project is a monorepo, PNPM and Yarn are both good options.

PNPM vs Yarn Workspaces

Yarn has a feature called Workspaces that is geared toward making Yarn work well for monorepos. PNPM, on the other hand, seems very much focused on monorepo support. Its approach to structuring the node_modules directory is of great benefit when managing several projects with package.json files in the same repository.

That said, I don't feel like I can fairly evaluate the two because I don't have enough experience with Yarn Workspaces. I came across PNPM and it was instantly beneficial to me, so I stuck with it.


To sum it all up, if you have a monorepo or performance issues with NPM, consider using an alternative option like PNPM or Yarn. Otherwise, stick with the thing everyone is comfortable using.

Let's Connect

Keep Reading

WTF is NPM?

A brief description of NPM.

Jun 29, 2020

WTF is a Monorepo?

Have you heard this term thrown around but not really sure what it means. Well, let's take a quick introductory look at it.

Mar 09, 2021

WTF is Hoisting?

Sometimes JavaScript code appears to behave oddly. Hoisting is one of the reasons why. Here's an introduction to the concept, with references to more in-depth explorations.

Aug 07, 2020