DEV Community

Cover image for PNPM As Your Package Manager
James 'Dante' Midzi
James 'Dante' Midzi

Posted on • Edited on • Originally published at dantedecodes.hashnode.dev

PNPM As Your Package Manager

If you have been working with any node/javascript framework - be it React, Angular, Vue - there's an issue if you use npm or yarn.

It's something that happens in the background that you may not have noticed with every project you fire up - you redownload the packages in every instance.

What that means is that you end up having duplicates of the same packages in different folders on your machine.

I don't know about you, but I'm not okay with that...

Why PNPM?

Instead of redownloading the packages again, pnpm creates a central store where the packages are kept.

When you start up a new project, it checks if any of the packages required are already present on your system. If they are, it creates a reference to that store and doesn't redownload anything.

🟒Node.js Tip

Why store separate copies of packages if you can have a single referencable one?

That's the idea behind PNPM which makes it a performant, space-efficient, and faster alternative to NPM/Yarn.

Trust me, your hard disk will thank you for this weight loss exercise pic.twitter.com/mltti8CFAX

β€” Hem (@HemSays) September 6, 2021

Conclusion

Because I cannot do PNPM justice. Let me direct you to their site where they will do a much better job than I can:

PNPM


Thank you for reading, let's connect!

Thank you for visiting this little corner of mine. Let's connect on Twitter, Polywork and LinkedIn

Top comments (0)