También probé $env:NODE_OPTIONS="--max-old-space-size=8000" y configuré mi memoria máxima en 8000, pero me da el mismo error cada vez que npm ejecuto build.
entonces no puedo implementar
tengo 8gb de ram no se que mas puedo hacer
PS C:\Users\91955\Desktop\SFmovies\frontend> npm run build > frontend@0.1.0 build > react-scripts build Creating an optimized production build... <--- Last few GCs ---> [17892:000001D77EA8E2A0] 36182 ms: Scavenge 2034.0 (2082.8) -> 2032.4 (2083.0) MB, 3.1 / 0.0 ms (average mu = 0.183, current mu = 0.156) allocation failure [17892:000001D77EA8E2A0] 36186 ms: Scavenge 2034.5 (2083.0) -> 2032.8 (2083.3) MB, 2.5 / 0.0 ms (average mu = 0.183, current mu = 0.156) allocation failure [17892:000001D77EA8E2A0] 36190 ms: Scavenge 2035.0 (2083.5) -> 2033.3 (2087.8) MB, 2.5 / 0.0 ms (average mu = 0.183, current mu = 0.156) allocation failure <--- JS stacktrace ---> FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory 1: 00007FF6526730AF v8::internal::CodeObjectRegistry::~CodeObjectRegistry+112511 2: 00007FF652602216 DSA_meth_get_flags+65542 3: 00007FF6526030CD node::OnFatalError+301 4: 00007FF652F34B6E v8::Isolate::ReportExternalAllocationLimitReached+94 5: 00007FF652F1F09D v8::SharedArrayBuffer::Externalize+781 6: 00007FF652DC268C v8::internal::Heap::EphemeronKeyWriteBarrierFromCode+1468 7: 00007FF652DCF339 v8::internal::Heap::PublishPendingAllocations+1129 8: 00007FF652DCC30A v8::internal::Heap::PageFlagsAreConsistent+2842 9: 00007FF652DBEF89 v8::internal::Heap::CollectGarbage+2137 10: 00007FF652DBD140 v8::internal::Heap::AllocateExternalBackingStore+2000 11: 00007FF652DE1A76 v8::internal::Factory::NewFillerObject+214 12: 00007FF652B14CB5 v8::internal::DateCache::Weekday+1797 13: 00007FF652FC2541 v8::internal::SetupIsolateDelegate::SetupHeap+494417 14: 000001D701EE9A38Resolví mi problema agregando esto en "scripts" en mi paquete.json
"build": "react-scripts --max_old_space_size=4096 build"my Package.json si tienes alguna duda..