FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory while running ionic run android --prod

Viewed 723

Getting the following error on ionic run android --prod in Ionic2 .cant figure out the why this issue is occuring.

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: 
<--- Last few GCs --->

  153833 ms: Mark-sweep 1324.2 (1434.9) -> 1324.1 (1434.9) MB, 713.3 / 0.0 ms [allocation failure] [GC in old space requested].
  154555 ms: Mark-sweep 1324.1 (1434.9) -> 1324.1 (1434.9) MB, 721.0 / 0.0 ms [allocation failure] [GC in old space requested].
  155283 ms: Mark-sweep 1324.1 (1434.9) -> 1326.3 (1413.9) MB, 728.0 / 0.0 ms [last resort gc].
  156007 ms: Mark-sweep 1326.3 (1413.9) -> 1328.8 (1413.9) MB, 724.2 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 0x30ce6f3cfb51 <JS Object>
    1: _parseMappings(aka SourceMapConsumer_parseMappings) [/home/neeraj/Desktop/insuranext-mobile/node_modules/source-map/lib/source-map-consumer.js:463] [pc=0x28d87b18d8cb] (this=0x1f97a1ed4fa9 <a BasicSourceMapConsumer with map 0x7cf5b6bebd1>,aStr=0x275d205bce9 <Very long string[5209]>,aSourceRoot=0x30ce6f304381 <undefined>)
    2: get [/home/neeraj/Desktop/insuranext-mobile/node_modules/sou...

node::Abort() [node]
 2: 0x10983ec [node]
 3: v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
 5: v8::internal::Factory::NewInternalizedStringImpl(v8::internal::Handle<v8::internal::String>, int, unsigned int) [node]
 6: v8::internal::StringTable::LookupString(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>) [node]
 7: v8::internal::LookupIterator::PropertyOrElement(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, bool*, v8::internal::LookupIterator::Configuration) [node]
 8: v8::internal::Runtime::GetObjectProperty(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>) [node]
 9: 0xecfb11 [node]
10: v8::internal::Runtime_KeyedGetProperty(int, v8::internal::Object**, v8::internal::Isolate*) [node]
11: 0x28d86ca092a7
Aborted (core dumped)

Any solutions?

0 Answers
Related