Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it supposed to take 10 minutes for `npm install` to run after creating a Yeoman generator or am I doing something wrong?

I've used grunt before but haven't tried using Yeoman generators until recently. The generators themselves doesn't take long to run, but running npm install afterwards takes what feels like an eternity, with pages and pages and pages of dependencies being downloaded and installed.

Am I doing something wrong or am I supposed to go make a coffee after I run a generator?

like image 449
CheapSteaks Avatar asked Dec 13 '13 08:12

CheapSteaks


People also ask

How long does npm install take?

npm install : 4.1 minutes per run. yarn : 2 minutes for the first run and 1 minute for subsequent runs.

How do I know if npm is installed successfully?

To see if NPM is installed, type npm -v in Terminal. This should print the version number so you'll see something like this 1.4.

Why npm is not installing?

If your npm is broken: On Mac or Linux, reinstall npm. Windows: If you're on Windows and you have a broken installation, the easiest thing to do is to reinstall node from the official installer (see this note about installing the latest stable version).


1 Answers

Really depends on the generator you use. Yeoman generators just creates the basic files, including package.js, which defines which NPM packages would be used by tools in your new project. The time it will take to run "npm install" depends on the amount of dependedcies in the package.js file that is created by the generator you use.

It may be quicker the second time you use the same generator, as some of the packages may be cached by your local NPM

like image 175
Ricki Runge Avatar answered Oct 21 '22 03:10

Ricki Runge