novaline novaline - 1 month ago 9
Node.js Question

Does npm install package twice?

I run

npm install
to install my dependencies.

At first time, some package install failed.

I ran
npm install
again.

Will
npm
reinstall every dependency again or just the package not be installed ?

Answer

Running npm install apart from the first time, installs only the missing packages and those that needs update.

As per stian's input, refer docs.npmjs.com/cli/install#algorithm

Comments