Have you ever seen the memes on Reddit thread of Twitter
or this!
you can find more on this link
npm is package manager tool for JavaScript in almost every web development project especially front-end projects.
But this tools comes with different problems I'm sure your facing now which are:
- the install process is kind of slow
- not very friend log message.
- large node_modules folder in every single project.
Facebook came up with an alternative tool yarn, it bit faster and have more friendly code log but have the same storage issue. I used to solve this issue by creating a main node_modules folder in my hard disk and use symlinks to all my folders, but it's kind of frustrating so I drop this solution not very long after.
recently I have read about a new tool that solves the three issues that we discussed above that tool is called pnpm. pnpm is tools that is very similar to npm, if familiar with how npm commands pnpm is just the same. when using npm or yarn if have 1000 project that means you will have 1000 dependencies folder in each project in your hard drive, pnpm will install all the dependencies in one universal folder that is linked to all of your 1000 project using sumlinks that is managed for you under the hood.
this approach solve all the issues that we discussed earlier if you have already installed a dependency it will use that one instead of downloading in from the start. this means less storage used and faster installing process how cool is that, it even have a very minimalist log message.
the first day I used pnpm I felt over the top because it solves an issue I hated so mush and after couple of days using it I've had no issues using it so I felt that I need to share this tool with everyone that didn't hear about.
conclusion:
pnpm is yet another package manager tool that is responsible for installing Javascript dependencies it's just more faster and more convenient and has a minimalist friendly log message.
if you know any other tools that I didn't hear about I'd love you to share your knowledge with me.
Top comments (0)