Summary
To get more information about an npm command, enter the following command in your terminal (replace term
with the command you want more information on):
npm help term
Details
As an example, if you wanted to learn more about the npm install
command, you would enter the following command in your terminal:
npm help install
After entering the above command, you should see something similar to the following in your terminal:
NPM-INSTALL(1)
NAME
npm-install - Install a package
SYNOPSIS
npm install (with no args, in package dir)
npm install [<@scope>/]<name>
npm install [<@scope>/]<name>@<tag>
npm install [<@scope>/]<name>@<version>
npm install [<@scope>/]<name>@<version range>
npm install <git-host>:<git-user>/<repo-name>
npm install <git repo url>
npm install <tarball file>
npm install <tarball url>
npm install <folder>
aliases: npm i, npm add
common options: [-P|--save-prod|-D|--save-dev|-O|--save-optional] [-E|--save-exact] [-B|--save-bundle] [--no-save] [--dry-run]
DESCRIPTION
This command installs a package, and any packages that it depends on. If the package
has a package-lock or shrinkwrap file, the installation of dependencies will be
:
You can use the arrow keys to scroll up or down through the information. To exit this information screen, press the Q key on your keyboard.
Exercises
Try running npm help install
in your terminal.
References
npm-help on the npm Documentation website