node install all dependencies code example

Example 1: install npm globally

npm install npm@latest -g

Example 2: npm install package as developer dependency

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

Example 3: install dependencies npm

npm install

Example 4: how to install node dependencies

#how to install project dependecies when you download project

# example:
npm install

#NOTE:: by entering only this command your all dependecies will automatically installed.

Example 5: install all dependencies npm

# from package.json dependancy list
$ npm i

Example 6: install node modules from package.json

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]