16
Q:

how to install npm packages

npm install npm@latest -g
3
npm install package-name -g
3
#Syntex
npm install packagename -g

#example
npm install express -g
3
#how to install any specific package in nodejs Application
# Syntex
npm install packagename

# example:
npm install express
npm i express

#if you install globally then type 
npm install express -g
2
npm install package-name

To save as a dependency:
npm install package-name --save
3
npm i -g <package>
0
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]
1
npm i <package>
0

New to Communities?

Join the community