Angular-cli: ng new takes long to finish

Created on 25 Aug 2016  路  9Comments  路  Source: angular/angular-cli

To Setup a Project the command ng new takes very Long to finish. More than 10 minutes are too much I think.

angular-cli: 1.0.0-beta.11-webpack.2
node: 4.4.0
os: win 10 win32 x64

Dave.

Most helpful comment

The simple solution to this problem is _close the command window forcefully_ to abort the process,and then delete the node-modules folder which has been created so far. Finally run npm install command to have node-modules explicitly .

All 9 comments

AngularCLI files are created in less than a second. But there are a lot of packages that have to be downloaded. This takes a lot of time :(

How much time it takes?
I tried two times, it stops after creating some folders for a while!...

The simple solution to this problem is _close the command window forcefully_ to abort the process,and then delete the node-modules folder which has been created so far. Finally run npm install command to have node-modules explicitly .

Another approach is to use the --skip-install flag which generates a new project without installing all the node modules. You can then run npm install later in the generated project directory to install all the required modules.

ng new project is EXACTLY SAME as ng new project --skip-install, then npm install. node_modules is binary exactly same. I tested it. DO NOT GIVE FALSE ADVICES WHICH YOU DID NOT TESTED, YOU WASTE OUR TIME. These pages are full of false advices, and between them are a few good advices.

This is quick:
ng new proj --skip-install
npm update

But to run app is there is need to install this:
npm install --save @angular-devkit/build-angular @angular/compiler-cli

And this install nearly same as npm install (slightly less) - 23749 files, 181 MB (full node_modules 205 MB).

Although I agree that "ng new project --skip-install" followed by "npm install" should be the SAME as "ng new project", for me ng new project takes forever and using the separate npm install does not.

Not entirely sure what could be the real issue.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings