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

2 1

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

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here β†’

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series πŸ“Ί

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series πŸ‘€

Watch the Youtube series