PNPM > YARN > NPM

Arun Prakash
2 min readJan 11, 2023

--

Are you still using NPM? It’s time to move on for something better!!

PNPM or Performant NPM is a potential alternate for a traditional Node Package Manager. Here is why!

3 reasons why you should consider PNPM over NPM and YARN.

1. PNPM is 3 times faster than NPM and more efficient than YARN
2. PNPM has reduced disk space usage.
3. PNPM solves the NPM doppelganger problems. (https://lnkd.in/gCCpfRcc)

Image Source : Google

YARN is faster than NPM Because, unlike NPM, Yarn involves the parallel installation of packages. PNPM is even better and faster than YARN as it links files from the global centralized store, thus no redundancy involved in copying the same packages multiple times.

Example: When you install a same package with NPM and PNPM,

$ npm install

added 47 packages, and audited 48 packages in 11s
found 0 vulnerabilities

$ pnpm install
Progress: resolved 47, reused 28, downloaded 19, added 47, done

The difference is that PNPM relies on the possibility of reusing the already existing packages in the system, while NPM makes it complex by using redundant packages, thus making the process slower as well as increasing disk usage.

Do you still think NPM can make a comeback? Do you use PNPM? Do you have some alternate views on the same? Feel free to comment here.

--

--

Arun Prakash
Arun Prakash

Written by Arun Prakash

I write about Cloud, DevOps and SRE Stuffs! Passionate about Security !

No responses yet