How Node Package Manager works
NPM has website with search bar and you can search packages. These packages located in the NPM registry and this registry keeps track of files that have been submitted. Anybody can submit new files to the NPM registry that we call packages or modules.
What does NPM DO?
Benefits of Node Package Manger
You get expertise from others and maybe don’t know everything; maybe others are better than at certain things. You can use their collective knowledge to use their code.
There is also a down side of NPM registry. Remember not all packages are good code. Anybody can put their files to Node Package Manager and you also adding more bits to your project which makes your project size even bigger. So, if you are building a web app then you should minimize the size of your app to make a faster web app. There is an art to find good NPM packages. You will learn how to grab good packages from NPM when you have a Little bit experience.
What is Yarn NPM?
So, let’s a little bit about the alternative of Yarn. Yarn is a tool to grab packages from NPM registry. Yarn and Node Package Manager are similar if you learn about yarn then you learns about it. When you want to find the packages for your project you will have two options to do this one is NPM and the second is Yarn. Yarn is one 100 percent similar to Node Package Manager but the fact is that it’s an alternative and it is managed by the Facebook.
Remember Facebook created Yarn and Microsoft own Node Package Mangager. The idea to build Yarn was that a couple of years ago people think that Node Package Manager is slower in a lot of operations. It did not include support for log files and not work fast enough.
Types of Packages in Node Package Manager
You can browse NPM to find the packages but there are three types of packages. These are described below:
- The packages that you can use on the browser. This mean on the front end. You can download all that scripts that are useful for front-end. You can get the jQuery files.
- The second type of packages that it has is the back-end packages. The packages that you run on Node Js.