Recibo este error al servir el proyecto angular. ng build --prod está funcionando bien
<--- Last few GCs ---> [4916:00000276B1C57010] 588109 ms: Scavenge (reduce) 8180.7 (8204.3) -> 8180.6 (8205.1) MB, 36.1 / 0.0 ms (average mu = 0.081, current mu = 0.007) allocation failure [4916:00000276B1C57010] 673012 ms: Mark-sweep (reduce) 8181.3 (8202.1) -> 8181.0 (8203.3) MB, 84897.4 / 0.6 ms (average mu = 0.041, current mu = 0.003) allocation failure scavenge might not succeed <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF6A3CF3E0F napi_wrap+108911 2: 00007FF6A3C97E16 v8::base::CPU::has_sse+61910 3: 00007FF6A3C98D16 node::OnFatalError+294 4: 00007FF6A4570CEE v8::Isolate::ReportExternalAllocationLimitReached+94 5: 00007FF6A4555ACD v8::SharedArrayBuffer::Externalize+781 6: 00007FF6A43FF95C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1516 7: 00007FF6A440ACEA v8::internal::Heap::ProtectUnprotectedMemoryChunks+1258 8: 00007FF6A4407E99 v8::internal::Heap::PageFlagsAreConsistent+2457 9: 00007FF6A43FCA71 v8::internal::Heap::CollectGarbage+2033 10: 00007FF6A43FAC95 v8::internal::Heap::AllocateExternalBackingStore+1349 11: 00007FF6A441AFEB v8::internal::Factory::NewFillerObject+203 12: 00007FF6A4149F81 v8::internal::interpreter::JumpTableTargetOffsets::iterator::operator=+1409 13: 00007FF6A45F9BAD v8::internal::SetupIsolateDelegate::SetupHeap+465229 14: 00007FF6A459378D v8::internal::SetupIsolateDelegate::SetupHeap+46381 15: 00000360181DD9FCVersión del nodo: v14.17.0
Angular:
/ \ _ __ __ _ _ _| | __ _ _ __ / ___| | |_ _| / △ \ | '_ \ / _` | | | | |/ _` | '__| | | | | | | / ___ \| | | | (_| | |_| | | (_| | | | |___| |___ | | /_/ \_\_| |_|\__, |\__,_|_|\__,_|_| \____|_____|___| |___/ Angular CLI: 11.0.5 Node: 14.17.0 OS: win32 x64 Angular: 11.0.5 ... animations, cli, common, compiler, compiler-cli, core, forms ... language-service, platform-browser, platform-browser-dynamic ... router Ivy Workspace: Yes Package Version --------------------------------------------------------- @angular-devkit/architect 0.1100.5 @angular-devkit/build-angular 0.1100.5 @angular-devkit/core 11.0.5 @angular-devkit/schematics 11.0.5 @angular/cdk 11.2.13 @angular/material 11.1.2 @schematics/angular 11.0.5 @schematics/update 0.1100.5 rxjs 6.6.3 typescript 4.0.5Probé varios comandos pero ninguno funciona: >node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng serve
Puede probar este comando:
node --max_old_space_size=8048 ./node_modules/@angular/cli/bin/ng serveque he visto en una publicación bastante similar. Esto debería solucionar el problema del montón de memoria javascript temporalmente