Angular-cli: JavaScript heap out of memory

Created on 10 Nov 2016  路  4Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Windows 10.

Versions.

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

Repro steps.

>
This is big project

The log given by the failure.

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

.

How can I set Heap size in ng


Thanks! We'll be in touch soon.

Most helpful comment

For others also seeking help with this, the issue is known to plague the CLI (#1652, #2974) when projects grow beyond what many of us consider small-medium sized codebases.

As you mentioned, the fix it to set Node's heap size. This is done with node --max_old_space_size=[Space in MB] followed by whatever call you wanted to make, e.g. node --max_old_space_size=2048 ./node_modules/.bin/ng build (Credit to @hansl for that one line.)

All 4 comments

For others also seeking help with this, the issue is known to plague the CLI (#1652, #2974) when projects grow beyond what many of us consider small-medium sized codebases.

As you mentioned, the fix it to set Node's heap size. This is done with node --max_old_space_size=[Space in MB] followed by whatever call you wanted to make, e.g. node --max_old_space_size=2048 ./node_modules/.bin/ng build (Credit to @hansl for that one line.)

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

Related issues

purushottamjha picture purushottamjha  路  3Comments

delasteve picture delasteve  路  3Comments

gotschmarcel picture gotschmarcel  路  3Comments

MateenKadwaikar picture MateenKadwaikar  路  3Comments

JanStureNielsen picture JanStureNielsen  路  3Comments