Skip to main content
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Required fields*

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in Ionic 3

When I run an Ionic 3 project using the ionic serve command, then I am getting this error:

Screenshot of FATAL ERROR: ineffective mark-compacts near heap limit Allocation failed - JavaScript

Answer*

Cancel
5
  • 3
    after changing the value of x.. error remains the same
    Sohail Ahmad
    –  Sohail Ahmad
    2019-09-13 14:05:29 +00:00
    Commented Sep 13, 2019 at 14:05
  • 1
    If the error continues, keep increasing the size until there is enough memory to process which will eventually prevent the error. The only time I found I couldn't get past this error was with ng serve and a massive .js file referenced in the scripts section of angular.json that needed to be loaded into memory.
    atconway
    –  atconway
    2019-11-05 22:04:37 +00:00
    Commented Nov 5, 2019 at 22:04
  • can I set the value of X greater than 8192? I have 32GB of RAM
    Diego
    –  Diego
    2019-12-27 16:36:34 +00:00
    Commented Dec 27, 2019 at 16:36
  • for me, supplying max-old-space-size on the command line did NOT work. This MAY be an interaction with nvm based node? instead inside a bash script, i used 'NODE_OPTIONS="--max-old-space-size=2048" node $NG build --prod --progress=false' which worked, as opposed to 'node --max-old-space-size=2048 $NG build --prod --progress=false' which did not. I still don not know why.
    Simon H
    –  Simon H
    2020-07-23 10:38:52 +00:00
    Commented Jul 23, 2020 at 10:38
  • if you run this inside docker and get KILLED error, increase the RAM allocated to docker engine as well.
    Nima Ajdari
    –  Nima Ajdari
    2021-03-17 09:59:36 +00:00
    Commented Mar 17, 2021 at 9:59

Morty Proxy This is a proxified and sanitized view of the page, visit original site.