To make use of these tools (or packages) in Node.js we need to be able to install and manage them in a useful way. This is where npm, the Node package manager, comes in. It installs the packages you want to use and provides a useful interface for working with them.
In this tutorial, I’m going to look at the basics of working with npm. I’ll show you how to install packages in local and global mode, as well as delete, update and install a certain version of a package. I’ll also show you how to work with package.json to manage a project’s dependencies.