build exceeding memory limit

so i have a pretty large nextjs application and it builds fine without having export const runtime = "edge"; set however once i set this in my layout.tsx it maxs out for some reason

 <--- Last few GCs --->
 
 [15444:0000020BA9850080]    56838 ms: Mark-Compact (reduce) 3066.7 (3085.9) -> 3065.8 (3085.9) MB, 212.79 / 0.00 ms  (average m05) allocation failure; scavenge might not succeed
 [15444:0000020BA9850080]    57296 ms: Mark-Compact (reduce) 3066.8 (3085.9) -> 3066.1 (3086.1) MB, 457.69 / 0.00 ms  (average m02) allocation failure; scavenge might not succeed
 
 <--- JS stacktrace --->
 
 FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 ----- Native stack trace -----
 
  1: 00007FF6558EC44B node::SetCppgcReference+15579
  2: 00007FF6558634B4 DSA_meth_get_flags+87796
  3: 00007FF6563263F1 v8::Isolate::ReportExternalAllocationLimitReached+65
  4: 00007FF65630FDA8 v8::Function::Experimental_IsNopFunction+1192
  5: 00007FF656160C00 v8::PrimitiveArray::Length+426608
  6: 00007FF65615DEE5 v8::PrimitiveArray::Length+415061
  7: 00007FF6561732E4 v8::PrimitiveArray::Length+502100
  8: 00007FF656173BA8 v8::PrimitiveArray::Length+504344
  9: 00007FF656183CC9 v8::PrimitiveArray::Length+570169
 10: 00007FF655E5172B v8::CodeEvent::GetFunctionName+112299
 11: 00007FF5F63A667A
 Compiler edge-server unexpectedly exited with code: 134 and signal: null
 
 > Build error occurred
2.0\node_modules\next\dist\compiled\jest-worker\index.js:1:12545)
     at ChildProcess.emit (node:events:531:35)
     at ChildProcess._handle.onexit (node:internal/child_process:294:12) {
   type: 'WorkerError'
 }
  ELIFECYCLE  Command failed with exit code 1.
 ERROR: command finished with error: command (G:\GitHub\mixie-normal-image\apps\mixie) C:\Users\jacob\AppData\Local\pnpm\pnpm.CMD run build exited (1)
: command (G:\GitHub\mixie-normal-image\apps\mixie) C:\Users\jacob\AppData\Local\pnpm\pnpm.CMD run build exited (1)
Was this page helpful?