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

1

10

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?

Lobation answered 13/12, 2013 at 8:35 Comment(4)
what do you mean by generators? is it a particular plugin?Gravestone
oops, I meant Yeoman generators. I've tried generator-webapp and generator-backbone, each time I run them it feels like they're downloading every single repository on NPMLobation
you could use a tool like github.com/hughsk/colony to look into the dependency graph before install, most likely the generator just has a lot of depsGravestone
I am experiencing this same thing trying to run the AngularJS generator. It has been downloading for over an hour and has downloaded thousands of files bringing the file browser to a halt. I also notice that it seems to continually download the same files over and over again. Worse is that when I interrupt the install so I can get some work done it takes me over an hour to delete the downloaded files. This is supposed to be a lightweight web-application. The number of these dependencies can't be right. I feel like it's getting cyclical.Binford
K
3

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

Kruller answered 19/2, 2014 at 8:0 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.