Effect CommunityEC
Effect Community16mo ago
9 replies
staubfuss

Vitest Coverage Command Fails with JavaScript Heap Out of Memory Error

Hmm I got a very strange vitest probelem. When running --coverage I get the following error
<--- Last few GCs --->
[70536:0x58811b0]    31196 ms: Scavenge 2009.6 (2056.7) -> 2003.4 (2057.7) MB, 3.14 / 0.00 ms  (average mu = 0.254, current mu = 0.207) allocation failure; 
[70536:0x58811b0]    31208 ms: Scavenge 2011.1 (2058.2) -> 2004.7 (2058.9) MB, 3.71 / 0.00 ms  (average mu = 0.254, current mu = 0.207) allocation failure; 
[70536:0x58811b0]    31220 ms: Scavenge 2013.0 (2060.2) -> 2006.6 (2077.2) MB, 3.41 / 0.00 ms  (average mu = 0.254, current mu = 0.207) allocation failure; 
<--- JS stacktrace --->
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb84bd6 node::OOMErrorHandler(char const*, v8::OOMDetails const&) [node (vitest)]
 2: 0xefead0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node (vitest)]
 3: 0xefedb7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node (vitest)]
 4: 0x11107c5  [node (vitest)]
 5: 0x1110d54 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node (vitest)]
 6: 0x1127c44 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [node (vitest)]
 7: 0x112845c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node (vitest)]
 8: 0x112a5ba v8::internal::Heap::HandleGCRequest() [node (vitest)]
 9: 0x1095c27 v8::internal::StackGuard::HandleInterrupts() [node (vitest)]
10: 0x1537482 v8::internal::Runtime_StackGuardWithGap(int, unsigned long*, v8::internal::Isolate*) [node (vitest)]
11: 0x7f0f73ed9ef6 
 ELIFECYCLE  Command failed with exit code 134.

Running latest vitest and @effect/vitest inside a devcontainer in vscode? Maybe that is the issue? any hints?
Was this page helpful?