Error: Allocation failed - JavaScript heap out of memory
See original GitHub issueThis error happens when Webpack is trying to rebuild the code after frontity dev
has been running for a while.
<--- Last few GCs --->
[50072:0x10268f000] 19835577 ms: Mark-sweep 1369.9 (1406.9) -> 1369.9 (1406.9) MB, 318.2 / 0.0 ms (average mu = 0.249, current mu = 0.000) last resort GC in old space requested
[50072:0x10268f000] 19835886 ms: Mark-sweep 1369.9 (1406.9) -> 1369.9 (1406.9) MB, 309.2 / 0.0 ms (average mu = 0.142, current mu = 0.000) last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0xec93b85be3d]
1: ConstructFrame [pc: 0xec93b80d145]
2: StubFrame [pc: 0xec93b889d9d]
Security context: 0x1b1f47a1e6e9 <JSObject>
3: new Script(aka Script) [0x1b1f1e79a5d9] [vm.js:80] [bytecode=0x1b1fa055e909 offset=373](this=0x1b1fe0682801 <the_hole>,/* anonymous */=0x1b1f632028e9 <Very long string[3972035]>,/* anonymous */=0x1b1f63202911 <Object map = 0x1b1f995540b9>)
4: ConstructFrame [pc: 0xec93b8...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: 0x10003c597 node::Abort() [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
2: 0x10003c7a1 node::OnFatalError(char const*, char const*) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
3: 0x1001ad575 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
4: 0x100579242 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
5: 0x100582744 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
6: 0x100554534 v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
7: 0x100686109 v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
8: 0x100719ec3 v8::internal::parsing::ParseProgram(v8::internal::ParseInfo*, v8::internal::Isolate*) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
9: 0x1002cf069 v8::internal::(anonymous namespace)::CompileToplevel(v8::internal::ParseInfo*, v8::internal::Isolate*) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
10: 0x1002d0594 v8::internal::Compiler::GetSharedFunctionInfoForScript(v8::internal::Handle<v8::internal::String>, v8::internal::Compiler::ScriptDetails const&, v8::ScriptOriginOptions, v8::Extension*, v8::internal::ScriptData*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason, v8::internal::NativesFlag) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
11: 0x1001b7470 v8::ScriptCompiler::CompileUnboundInternal(v8::Isolate*, v8::ScriptCompiler::Source*, v8::ScriptCompiler::CompileOptions, v8::ScriptCompiler::NoCacheReason) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
12: 0x100066136 node::contextify::ContextifyScript::New(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
13: 0x10023663f v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo*) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
14: 0x1002357db v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
15: 0x1002351f7 v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/orballo/.nvm/versions/node/v10.15.3/bin/node]
16: 0xec93b85be3d
Abort trap: 6
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to Fix JavaScript Heap Out of Memory Error - MakeUseOf
A common problem while working on a JavaScript Node.js project is the “JavaScript heap out of memory” error. This error usually occurs when ......
Read more >JavaScript heap out of memory - Snyk Support
This generally occurs on larger projects where the default amount of memory allocated by Node (1.5gb) is insufficient to complete the command successfully....
Read more >Node.js heap out of memory - javascript - Stack Overflow
I have a 64-bit CPU and I've installed x86 node version, which caused the CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory ......
Read more >JavaScript Heap Out Of Memory Error - OpenReplay Blog
A quick solution that you can use to fix "Heap Out Of Memory Error" in JavaScript. We lay out the causes and how...
Read more >JavaScript Heap Out of Memory - Position Is Everything
JavaScript heap out of memory is a common issue that occurs when there are a lot of processes happening concurrently. The default JavaScript...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Some people is claiming that this is solved by updating to Node 12.16:
I updated yesterday and while working today with
v12.16.3
, I still got this error: