Subcommands (1)
Options (3)
booleanInstall dependencies listed in `package.json`
Example:
npm {{[i|install]}}-D, --save-devbooleanDownload the latest version of a package and add it to the list of dev dependencies in `package.json`
Example:
npm {{[i|install]}} {{package_name}} {{[-D|--save-dev]}}-g, --globalbooleanDownload the latest version of a package and install it globally (set install location with `npm config set prefix`)
Example:
npm {{[i|install]}} {{package_name}} {{[-g|--global]}}Examples (4)
Install dependencies listed in `package.json`
npm [i|install]Download a specific version of a package and add it to the list of dependencies in `package.json`
npm [i|install] package_name@versionDownload the latest version of a package and add it to the list of dev dependencies in `package.json`
npm [i|install] package_name [-D|--save-dev]Download the latest version of a package and install it globally (set install location with `npm config set prefix`)
npm [i|install] package_name [-g|--global]made by @shridhargupta | data from tldr-pages