How to Install NPM Packages

Опубликовано: 26 Январь 2021
на канале: Hey Node
485
5

See the written version of this tutorial for links to prerequisites and related tutorials: https://heynode.com/tutorial/install-...

In this tutorial, you’ll learn the difference between npm install and npm install [package], where packages go, all about dependencies, and how to search for and choose Node Package Manager packages.

Installing packages and dependencies in Node is one of the most important tasks we accomplish using the npm Command Line Interface (CLI). Before an application can be run, you need to install all existing dependencies recorded in the application's package.json file. You can also add new packages from npmjs.com as dependencies to the application by running npm install [package]. You can install packages as a local dependency for an application, as a devDependency, or globally (making them accessible from anywhere on your system).

In this tutorial we'll:

Identify the difference between npm install and npm install [package]
Explain where packages go once they are installed
List different kinds of dependencies
Describe how to search for and choose npm packages

Heynode.com: The best online Node.js courses and tutorials to help you solve hard problems fast.