amplify-cli icon indicating copy to clipboard operation
amplify-cli copied to clipboard

Getting CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

Open vjindalaurea opened this issue 7 years ago • 3 comments

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 2: replace(this=0x59432cc54f1 <Very long string[14633491]>,0x59406da50f9 <JSRegExp <String[18]: [<>/\u2028\u2029]>>,0x59406da5191 <JSFunction escapeUnsafeChars (sfi = 0x594a087bb91)>) 3: serialize(aka serialize) [/vikas/office/aurea/code/fogbugz/cnu-manuscript-ui/node_modules/serialize-javascript/index.js:126] [bytecode=0x594f9dd2331 offset=185](this=0x59453e022d1 ,obj=0x594ed...

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)`

vjindalaurea avatar Apr 01 '19 12:04 vjindalaurea

This was problem of angular not amplifier.

vjindalaurea avatar Apr 01 '19 13:04 vjindalaurea

I am at the same spot - how did you solve it? @vjindalaurea

raohammad avatar Jan 06 '20 16:01 raohammad

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.

github-actions[bot] avatar May 26 '21 18:05 github-actions[bot]