angular-cli icon indicating copy to clipboard operation
angular-cli copied to clipboard

Takes a very very long time to install

Open pflannery opened this issue 10 years ago • 10 comments

Windows 10, i7 2.3ghz quad core 50Mb connection

angular-cli: 1.0.0-beta.19-3
node: 6.9.1
os: win32 x64

I understand it's still beta but it took me 25 minutes to get the cli to install itself and generate the first app. I noticed that this cli takes up 225 MB once installed. This seems a very extreme size for a cli app. The generated app takes up 240MB which is also really extreme for a basic skeleton.

Would be great if the sizes and install times could be reduced because Installing from npm can suck even on a 50mb connection. It takes no more than 5mins to download the angular1.zip @ 9MB and then setup a basic app. I just hope this will eventually be the same for angular 2 :)

pflannery avatar Nov 09 '16 23:11 pflannery

I'm suffering from long install times on Windows, too. Not 25 minutes, but at least 5 min, which is still pretty darn long! I'm on a 100 Mb/s connection, so I don't think download speed is the issue. Seems to be hanging at the part where it installs NPM packages.

jongunter avatar Nov 09 '16 23:11 jongunter

The CLI will be large because in addition to the Angular 2 framework (https://github.com/angular/angular), we have a lot of extra tooling and "nice-to-haves". Think of it like the Python interpretter vs an entire Python IDE with testing, static analysis, and deployment integration.

The CLI provides many features like a live-reload dev server and build system (Webpack + plugins + loaders), testing systems for both Unit tests and E2E, and capabilities to boilerplate your Angular 2 code for you. The installs take a while because there is a long list of dependencies and we pull multiple large projects (Ember-CLI, Webpack, Karma, Protractor, most of lodash, PostCSS, Bluebird, RxJS, UglifyJS, etc.). This dependency list is something the team has stated they're trying to trim down on whenever possible.

Open your local node_modules and you'll get a feeling for how many dependencies have to be pulled each time. A lot of these are minimally used, and many are likely being installed for something we depend on indirectly, or they were previously depended on and are now tech debt. Tech debt means the removal requires extensive testing to ensure nothing was using them without documenting it. Broccoli is a great example of something they were looking to remove, but seems to have broken something when that was attempted. As such we have broccoli all over our node_modules, and not many people even realize it's still there.

The good news? You really shouldn't need to install the entire project often. Yes, the CLI is a bit hefty, but the tools are well worth the extra weight in my opinion. The production output it provides is also very small in comparison. This has also been topic of concern as the builds can sometimes reach 2-3MB with larger projects, but after extensive AoT work, the sizes have been getting smaller and smaller each release.

celliott181 avatar Nov 10 '16 20:11 celliott181

Dupe of https://github.com/angular/angular-cli/issues/1263, we are working on it though.

filipesilva avatar Nov 21 '16 16:11 filipesilva

It is taking more than 40 mins and its still running for me.

harishh486 avatar Nov 02 '17 01:11 harishh486

same for me. I'm around 1h into installing right now.

ghost avatar Jan 01 '18 22:01 ghost

The install time for even simple angular projects that we clone from github or bitbucket, is taking way too much time.(>10 mins). Is there a solution to it ?

ashish051321 avatar Jan 24 '18 12:01 ashish051321

It also makes my machine to laaag: macOS became unresponsive - no browsers and all small programs could not be opened....

it ain't right....

Max-Lev avatar Jan 25 '18 23:01 Max-Lev

nearly 1 hour passed and it's still installing on Mac

fivedesigns avatar Feb 13 '18 13:02 fivedesigns

It is very long time and getting an error even I am using root login! is=0x17788a58c211 ,err=0x177875d23ca9 ,cre...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory 1: node::Abort() [/usr/local/bin/node] 2: node::FatalException(v8::Isolate*, v8::Localv8::Value, v8::Localv8::Message) [/usr/local/bin/node] 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node] 4: v8::internal::Factory::NewUninitializedFixedArray(int) [/usr/local/bin/node] 5: v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2> >::GrowCapacity(v8::internal::Handlev8::internal::JSObject, unsigned int) [/usr/local/bin/node] 6: v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node] 7: 0x1bbb0bf842fd 8: 0x1bbb0c0c287c EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@angular/cli/node_modules/node-sass/vendor'

kemin711 avatar Mar 17 '18 20:03 kemin711

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.