install node modules package.json code example

Example 1: npm install package as developer dependency

npm install --save-dev package
# example:
npm install --save-dev nodemon

Example 2: install node modules from package.json

npm install (with no args, in package dir)
npm install [<@scope>/]
npm install [<@scope>/]@
npm install [<@scope>/]@
npm install [<@scope>/]@
npm install :/
npm install 
npm install 
npm install 
npm install 

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]

Tags:

Misc Example