mutoe / vue3-realworld-example-app

Explore the charm of Vue composition API! Vite?
https://vue3-realworld-example-app-mutoe.vercel.app
MIT License
944 stars 340 forks source link

Vite out of memory #41

Closed levchak0910 closed 1 year ago

levchak0910 commented 3 years ago

Running our application locally results in an error: JavaScript heap out of memory This happens when vite optimizing dependencies. It takes approximately 3.5Gb of memory

If you also encounter this problem, try to increase the node memory limit (if you have that amount) using the command

node --max_old_space_size=5048 ./node_modules/vite/bin/vite.js
Log <--- Last few GCs ---> [5904:00000000003CE030] 33601 ms: Mark-sweep 2050.1 (2052.7) -> 2050.0 (2053.2) MB, 42.6 / 0.0 ms (average mu = 0.183, current mu = 0.001) allocation failure scavenge might not succeed <--- JS stacktrace ---> ==== JS stack trace ========================================= 0: ExitFrame [pc: 000000014087978D] 1: StubFrame [pc: 0000000140859BC9] Security context: 0x01a595e808d1 2: split [000001A595E8EBC1](this=0x0071d7880119 ,0x033bfa0c9ce1 >) 3: parseStackLinesV8 [00000397D2BBF539] [D:\projects\vue3-realworld-example-app\node_modules\esbuild\lib\main.js:1148] [bytecode=0000012268D26B81 offset=195](this=0x01... FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 000000013FC651EF napi_wrap+114271 2: 000000013FC0FE66 v8::base::CPU::has_sse+66630 3: 000000013FC10C66 v8::base::CPU::has_sse+70214 4: 000000014042522E v8::Isolate::ReportExternalAllocationLimitReached+94 5: 000000014040D301 v8::SharedArrayBuffer::Externalize+833 6: 00000001402D983C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1436 7: 00000001402E4A70 v8::internal::Heap::ProtectUnprotectedMemoryChunks+1312 8: 00000001402E1594 v8::internal::Heap::PageFlagsAreConsistent+3204 9: 00000001402D6D93 v8::internal::Heap::CollectGarbage+1283 10: 00000001402D6184 v8::internal::Heap::CollectAllAvailableGarbage+196 11: 00000001402D5484 v8::internal::Heap::AddRetainedMap+2580 12: 00000001402F660D v8::internal::Factory::NewFillerObject+61 13: 000000014005CCA1 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+1665 14: 000000014087978D v8::internal::SetupIsolateDelegate::SetupHeap+546637 15: 0000000140859BC9 v8::internal::SetupIsolateDelegate::SetupHeap+416649 16: 0000000140866D72 v8::internal::SetupIsolateDelegate::SetupHeap+470322 17: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 18: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 19: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 20: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 21: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 22: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 23: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 24: 000000014084C906 v8::internal::SetupIsolateDelegate::SetupHeap+362694 25: 00000001407F9DF3 v8::internal::SetupIsolateDelegate::SetupHeap+23987 26: 00000001408DDF70 v8::internal::SetupIsolateDelegate::SetupHeap+958256 27: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 28: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 29: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 30: 0000000140895099 v8::internal::SetupIsolateDelegate::SetupHeap+659545 31: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 32: 00000001408293E3 v8::internal::SetupIsolateDelegate::SetupHeap+218019 33: 000000014084DD42 v8::internal::SetupIsolateDelegate::SetupHeap+367874 34: 000000014081B8DD v8::internal::SetupIsolateDelegate::SetupHeap+161949 35: 00000001407FBB5C v8::internal::SetupIsolateDelegate::SetupHeap+31516 36: 0000000140332F80 v8::internal::Execution::CallWasm+1536 37: 0000000140333073 v8::internal::Execution::CallWasm+1779 38: 0000000140333452 v8::internal::Execution::TryCall+354 39: 0000000140315465 v8::internal::MicrotaskQueue::RunMicrotasks+501 40: 00000001403D8EC0 v8::internal::Builtins::builtin_handle+323456 41: 00000001403D8407 v8::internal::Builtins::builtin_handle+320711 42: 00000001403D8748 v8::internal::Builtins::builtin_handle+321544 43: 00000001403D854E v8::internal::Builtins::builtin_handle+321038 44: 000000014087988D v8::internal::SetupIsolateDelegate::SetupHeap+546893 45: 00000001407FE73C v8::internal::SetupIsolateDelegate::SetupHeap+42748 46: 00000001407FBC71 v8::internal::SetupIsolateDelegate::SetupHeap+31793 47: 00000001407FB85C v8::internal::SetupIsolateDelegate::SetupHeap+30748 48: 0000000140332EF3 v8::internal::Execution::CallWasm+1395 49: 0000000140332876 v8::internal::Execution::Call+182 50: 000000014040390D v8::Function::Call+605 51: 000000013FC85DB6 node::CallbackScope::~CallbackScope+998 52: 000000013FC86080 node::CallbackScope::~CallbackScope+1712 53: 000000013FC7F70B v8::internal::compiler::Operator::EffectOutputCount+235 54: 000000013FC059E3 v8::base::CPU::has_sse+24515 55: 000000013FBFB2A1 v8::internal::OrderedHashTable::NumberOfBucketsOffset+61089 56: 000000013FCB8937 uv_timer_stop+775 57: 000000013FCB52BB uv_async_send+331 58: 000000013FCB4A5C uv_loop_init+1212 59: 000000013FCB4C24 uv_run+244 60: 000000013FBC68F1 v8::internal::interpreter::BytecodeArrayWriter::source_position_table_builder+31857 61: 000000013FC399A3 node::Start+275 62: 000000013FAA6A9C RC4_options+340380 63: 0000000140931878 v8::internal::SetupIsolateDelegate::SetupHeap+1300536 64: 0000000076B3652D BaseThreadInitThunk+13 65: 0000000076D6C541 RtlUserThreadStart+33
levchak0910 commented 3 years ago

@mutoe have encountered this?

mutoe commented 3 years ago

I haven't encountered it. Does it seem to be a problem with Vite?

This is a similar discussion here https://github.com/vitejs/vite/discussions/2413

mutoe commented 3 years ago

@levchak0910 Both of you are on Windows machines. It’s time to file an issue with Vite ✌️

mutoe commented 3 years ago

link https://github.com/vitejs/vite/issues/2433

mutoe commented 1 year ago

Upstream issues, close this issue in this repository. Refer https://github.com/vitejs/vite/issues/2433