yarn serve - JavaScript heap out of memory crash
See original GitHub issueVersion
3.0.0-beta.15
Reproduction link
https://github.com/xrei/vuecli-bug
Steps to reproduce
Well… it’s not hard to reproduce but takes time.
Run yarn serve
and develop for some hours 😃
What is expected?
Stable working dev server
What is actually happening?
After some hours (~1-2) dev server will crash with an error:
95% emitting CopyPlugin
<--- Last few GCs --->
[2032:000001F314F3C8F0] 5471846 ms: Mark-sweep 1381.6 (1414.7) -> 1381.6 (1414.7) MB, 250.8 / 0.0 m
s allocation failure GC in old space requested
[2032:000001F314F3C8F0] 5472120 ms: Mark-sweep 1381.6 (1414.7) -> 1381.6 (1413.7) MB, 273.5 / 0.0 m
s last resort GC in old space requested
[2032:000001F314F3C8F0] 5472433 ms: Mark-sweep 1381.6 (1413.7) -> 1381.6 (1413.7) MB, 313.7 / 0.0 m
s last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 000001CC26384281]
Security context: 000002F26A1206A9 <JSObject>
1: fromString(aka fromString) [buffer.js:349] [bytecode=0000006AEF71E081 offset=148](this=000001
3071A022E1 <undefined>,string=0000031511A4D141 <Very long string[3793765]>,encoding=000002F26A131A29
<String[4]: utf8>)
2: from [buffer.js:201] [bytecode=0000006AEF71DC01 offset=11](this=0000023CE59638A9 <JSFunction
Buffer (sfi = 0000037B38A8B959)>,val...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::DecodeWrite
2: node_module_register
3: v8::internal::FatalProcessOutOfMemory
4: v8::internal::FatalProcessOutOfMemory
5: v8::internal::Heap::MaxHeapGrowingFactor
6: v8::internal::Factory::NewRawTwoByteString
7: v8::internal::Smi::SmiPrint
8: unibrow::Utf8DecoderBase::WriteUtf16Slow
9: v8::String::WriteUtf8
10: std::basic_ostream<char,std::char_traits<char> >::basic_ostream<char,std::char_traits<char> >
11: node::Buffer::New
12: node::Buffer::New
13: v8::internal::interpreter::BytecodeDecoder::Decode
14: v8::internal::RegExpImpl::Exec
15: v8::internal::RegExpImpl::Exec
16: v8::internal::RegExpImpl::Exec
17: 000001CC26384281
error Command failed with exit code 134.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:42
- Comments:49 (11 by maintainers)
Top Results From Across the Web
Yarn build - Crashes error JavaScript heap out of memory
The root is that you're probably including an infinite loop dependency in your package.json file. That can happen if i.e your package name...
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. Here's an example...
Read more >How to Fix JavaScript Heap Out of Memory Error - MakeUseOf
This error usually occurs when the default memory allocated by your system to Node. js is not enough to run a large project....
Read more >JavaScript Heap Out Of Memory Error | Felix Gerschau
This error indicates high memory usage or a memory leak in your application. In this article, I cover different solutions to this problem....
Read more >Yarn build - Crashes error JavaScript heap out of memory-Vue.js
Updating or using a bigger heap memory size won't fix the root of the problem. The root is that you're probably including an...
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
"dev": "npx --max_old_space_size=4096 vue-cli-service serve"
@atinybeardedman this worked for me
but just wanna say, that my own webpack config doesn’t have this issue with memory also i’m sure i have enough memory. just strange behaviour. maybe it’s because of webpack 4. I don’t know.
@xrei this is because of your code. for me , in my project , i have more than 500 pages and more 100 base components , and with a large assets and css with cssmodule. some bad practice with cssmodule from junior developer , this will take large memory. ( ´▽`)