JavaScript heap out of memory
See original GitHub issueI am using this in a medium large React project as part of the Webpack flow. For compression we are using the Babili-Webpack-Plugin. As this is just a small wrapper around Babili I figure the following issue is more related to Babili itself:
<--- Last few GCs --->
344958 ms: Mark-sweep 1324.0 (1434.9) -> 1324.0 (1434.9) MB, 1946.1 / 0.0 ms [allocation failure] [GC in old space requested].
346872 ms: Mark-sweep 1324.0 (1434.9) -> 1324.0 (1434.9) MB, 1913.9 / 0.0 ms [allocation failure] [GC in old space requested].
348780 ms: Mark-sweep 1324.0 (1434.9) -> 1327.8 (1405.9) MB, 1907.5 / 0.0 ms [last resort gc].
350727 ms: Mark-sweep 1327.8 (1405.9) -> 1331.7 (1405.9) MB, 1946.7 / 0.0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x381e5ffcfb51 <JS Object>
1: visitQueue [/workspace/1_ui/ui-foundation/node_modules/babel-traverse/lib/context.js:~114] [pc=0x35f210c516c7] (this=0x2bf0d5c576b9 <a TraversalContext with map 0x22808a4e239>,queue=0x2bf0d5c57701 <JS Array[1]>)
2: node [/workspace/1_ui/ui-foundation/node_modules/babel-traverse/lib/index.js:~94] [pc=0x35f210cf29bc] (...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [/usr/local/bin/node]
2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/usr/local/bin/node]
3: v8::Utils::ReportApiFailure(char const*, char const*) [/usr/local/bin/node]
4: v8::Utils::ApiCheck(bool, char const*, char const*) [/usr/local/bin/node]
5: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/usr/local/bin/node]
6: v8::internal::Factory::NewByteArray(int, v8::internal::PretenureFlag) [/usr/local/bin/node]
7: v8::internal::Factory::NewCode(v8::internal::CodeDesc const&, unsigned int, v8::internal::Handle<v8::internal::Object>, bool, bool, int, bool) [/usr/local/bin/node]
8: v8::internal::PropertyAccessCompiler::GetCodeWithFlags(unsigned int, char const*) [/usr/local/bin/node]
9: v8::internal::PropertyHandlerCompiler::GetCode(v8::internal::Code::Kind, v8::internal::Code::StubType, v8::internal::Handle<v8::internal::Name>) [/usr/local/bin/node]
10: v8::internal::NamedLoadHandlerCompiler::CompileLoadNonexistent(v8::internal::Handle<v8::internal::Name>) [/usr/local/bin/node]
11: v8::internal::NamedLoadHandlerCompiler::ComputeLoadNonexistent(v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Map>) [/usr/local/bin/node]
12: v8::internal::LoadIC::UpdateCaches(v8::internal::LookupIterator*) [/usr/local/bin/node]
13: v8::internal::LoadIC::Load(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>) [/usr/local/bin/node]
14: v8::internal::Runtime_LoadIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
15: 0x35f20b8092a7
Abort trap: 6
These are the relevant software versions:
- Mac OS Sierra
- Node 6.9.2
- Babili Preset 0.0.9
- Babel Core 6.18.2
- Babel Traverse 6.19.0
Is there anything I can do to debug this anymore?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:25
- Comments:40 (8 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 >Node.js heap out of memory - 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 - 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 >How to solve JavaScript heap out of memory error
To fix JavaScript heap out of memory error, you need to add the --max-old-space-size option when running your npm command. ... Alternatively, you ......
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 >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
Still getting the same issue as of July/August - disabling mangle didn’t help.
same issue here