Package manager

The second-to-last tool is also one that you will use most of the time; npm (https://www.npmjs.com) is the official package manager for Node.js. With npm, and through the official npm registry, you will have access to more than 1,000,000 packages, and the numbers keep rising. Hopefully, though, you'll probably need a bit less than that to create your applications!

So why would you need a package manager? If you have experience with any widespread ecosystem, then you'll probably be familiar with a few already: NuGet for .NET, Groovy and Maven for Java, Composer for PHP, and pip for Python. You name it. If not, then here's a short introduction. The basic idea of package management is very straightforward; your projects have dependencies and you need a clean and easy way to get them on your machine, update them to newer releases, and many others.

No matter the size of the project you'll work on in the future, you should consider package management (and actually configuration management in general) as a must. It streamlines your workflow (it's better to have a single, standard way to manage the project), it stabilizes your application if properly used, and can actually help you avoid or detect security issues. For example, npm can detect outdated and/or vulnerable dependencies and warn you. You certainly don't want to have to find/download/extract your dependencies manually.

There are actually three things that we call npm:

For now, you just need to know that you'll use npm to install dependencies easily and execute scripts. In addition, note that in the npm jargon, the dependencies that npm will manage for you will come in the form of npm packages, which will be downloaded from the official npm registry. Just for completeness, you should also know that there is a popular alternative to the npm CLI called Yarn (https://yarnpkg.com). Yarn was created at Facebook and published as open source in 2016.