title: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory in angular
body: <p>I'm using Angular 7.2. When I enter <code>ng serve</code>, I'm facing the following issue:</p>
  
  <blockquote>
    <p><strong>FATAL ERROR:</strong> Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory</p>
  </blockquote>
  
  <p>What does that mean? How do I fix that?</p>
  
  <p>The full error message is:</p>
  
  <pre><code>FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
  1: 0x8f9d10 node::Abort() [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  2: 0x8f9d5c  [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  3: 0xaffd0e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  4: 0xafff44 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  5: 0xef4152  [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  6: 0xef4258 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  7: 0xf00332 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  8: 0xf00c64 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  9: 0xf038d1 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  10: 0xeccd54 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  11: 0x116cede v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress]
  12: 0x19f62a4dbe1d
  Aborted (core dumped) 
  npm ERR! code ELIFECYCLE
  npm ERR! errno 134
  npm ERR! colo-ui@2.0.11 start: `ng serve --aot --proxy-config proxy.conf.json --host 0.0.0.0 --disable-host-check --live-reload --progress `
  npm ERR! Exit status 134
  npm ERR!
  npm ERR! Failed at the colo-ui@2.0.11 start script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2020-01-29T07_09_21_844Z-debug.log
  </code></pre>