Hello everyone! π
In this article, we look into the commonly used package managers - NPM and YARNπ€© Probably you already know about these two package managers and have used them in your React JS projects or while building React JS or Node JS web apps. But you may often have been relying on a quick google search every now and then for the commands used differently by both the package managers! So here we explore the similar and different commands used by both package managers!
Let's get started !!
So what are NPM and YARN basically?
A package manager is a tool that automatically handles a projectβs dependencies in a variety of ways. For example, with the help of a package manager, we can install, uninstall, update, and upgrade packages, configure project settings, run scripts, and so on. The package manager handles all of the heavy work, leaving us with only the coding which is the most enjoyable part.
NPM - It stands for Node Package Manager. This was released in 2010.
NPM involves a command-line interface (CLI) for interacting with npm via the terminal, the CLI tool. It ships as a default package manager with each fresh Node installation, which means we can start using it right away!
YARN - It stands for Yet Another Resource Negotiator, It is an alternative for npm.
It was released in 2016.
Yarn was created to address npm's shortcomings, such as performance and security concerns. It quickly established itself as a secure, speedy, and dependable JavaScript dependency management tool.
So what we get to know here is that package managers like NPM and Yarn make it easier to handle a project's dependencies.
So what are the commands which are * DIFFERENT * for both NPM and YARN?
What are they used for?
Let's look into this little sheet I prepared π
So what are the commands which are SAME for both NPM and YARN?
Let's look at another sheet I prepared π
So that's it for today! You have reached the end of the article π
Hope you liked this article and learned something and maybe it helped you remind the commands!
If you find this helpful please share and like it π π
Hi, I'm Amlan, a React Developer, and a CS Engineering student! This is my first blog article on DEV and I'm glad I finally decided to hop on the learning in public journey π
If you find this useful, please feel free to connect with me on any of the platforms below!
Top comments (2)
I use yarn ( or npm ) day by day, and know the main difference, but never saw that essence, great post.
Thank you !