Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should you use npm install vs npm i

Looking at npm's documentation, 'i' is an alias of 'install', would there be any circumstances where it is preferable to use the full 'npm install'?

like image 719
Mathew White Avatar asked May 15 '18 18:05

Mathew White


People also ask

What is the difference between npm install and npm I?

npm i: The npm i (or npm install) is used to install all dependencies or devDependencies from a package. json file. npm ci: CI stands for clean install and npm ci is used to install all exact version dependencies or devDependencies from a package-lock.

Why do we use npm I?

It helps with installing various packages and resolving their various dependencies. It greatly helps with your Node development. NPM helps you install the various modules you need for your web development and not just given you a whole bunch of features you might never need.

What is the difference between npm install and npm update?

The npm install installs all modules that are listed on package. json file and their dependencies. npm update updates all packages in the node_modules directory and their dependencies.

Why do we run npm install?

npm install downloads a package and it's dependencies. npm install can be run with or without arguments. When run without arguments, npm install downloads dependencies defined in a package. json file and generates a node_modules folder with the installed modules.


1 Answers

There is no specific difference between the two. It's just a lazy shortcut.

like image 140
VK18 Avatar answered Sep 19 '22 02:09

VK18