Getting CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
When i tried to host my angular application by using :
- amplify hosting add
- amplify publish
I got following error during publish :
`<--- Last few GCs --->
[13261:0x102801e00] 1090903 ms: Mark-sweep 1202.3 (1458.1) -> 1202.0 (1464.1) MB, 1040.8 / 0.0 ms allocation failure GC in old space requested [13261:0x102801e00] 1091848 ms: Mark-sweep 1202.0 (1464.1) -> 1202.0 (1419.6) MB, 944.5 / 0.0 ms last resort GC in old space requested [13261:0x102801e00] 1092727 ms: Mark-sweep 1202.0 (1419.6) -> 1202.0 (1408.1) MB, 879.0 / 0.0 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x594abea5879
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/Users/vjindal/.nvm/versions/node/v8.11.3/bin/node]
2: node::FatalException(v8::Isolate*, v8::Localv8::Value, v8::Localv8::Message) [/Users/vjindal/.nvm/versions/node/v8.11.3/bin/node]
3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/vjindal/.nvm/versions/node/v8.11.3/bin/node]
4: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/vjindal/.nvm/versions/node/v8.11.3/bin/node]
5: v8::internal::String::SlowFlatten(v8::internal::Handlev8::internal::ConsString, v8::internal::PretenureFlag) [/Users/vjindal/.nvm/versions/node/v8.11.3/bin/node]
6: v8::internal::Runtime_RegExpExecMultiple(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/vjindal/.nvm/versions/node/v8.11.3/bin/node]
7: 0x21efccd042fd
8: 0x21efccd68d56
/Users/vjindal/.nvm/versions/node/v8.11.3/lib/node_modules/@aws-amplify/cli/node_modules/amplify-frontend-javascript/lib/builder.js:17
context.print.info(frontend build command exited with code ${code.toString()});
^
TypeError: Cannot read property 'toString' of null at ChildProcess.buildExecution.on (/Users/vjindal/.nvm/versions/node/v8.11.3/lib/node_modules/@aws-amplify/cli/node_modules/amplify-frontend-javascript/lib/builder.js:17:74) at emitTwo (events.js:126:13) at ChildProcess.emit (events.js:214:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12)`
This was problem of angular not amplifier.
I am at the same spot - how did you solve it? @vjindalaurea
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help channels for those types of questions.