DEV Community

Discussion on: Fix of Angular-cli 'JavaScript heap out of memory' error while running 'ng serve'

Collapse
 
pritimaurya profile image
PritiMaurya

Why this error is come ?
what is root couse of this error?

Collapse
 
andreisfedotov profile image
Andrei Fedotov

The root of this problem lies in the insufficient amount of allocated memory for the application. This can happen when, for example, an application is quite large like an enterprise application. And there is not able to specify the heap allocation size with the help of ng command. However Node can be used not only to serve the application but also to perform such things like allocating more memory to the app.