报错信息
<--- JS stacktrace --->
FATAL ERROR: MarkCompactCollector: young object promotion failed Allocation failed - JavaScript heap out of memory
1: 0xa222f0 node::Abort() [node]
2: 0x96411f node::FatalError(char const*, char const*) [node]
3: 0xb97f1e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
4: 0xb98297 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
5: 0xd52fd5 [node]
6: 0xd83bbe v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject, int) [node]
7: 0xd8fbf6 v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::MemoryChunk*, long*) [node]
8: 0xd7bd8f v8::internal::Evacuator::EvacuatePage(v8::internal::MemoryChunk*) [node]
9: 0xd7c008 v8::internal::PageEvacuationTask::RunInParallel(v8::internal::ItemParallelJob::Task::Runner) [node]
10: 0xd6e8e9 v8::internal::ItemParallelJob::Run() [node]
11: 0xd91b50 void v8::internal::MarkCompactCollectorBase::CreateAndExecuteEvacuationTasks<v8::internal::FullEvacuator, v8::internal::MarkCompactCollector>(v8::internal::MarkCompactCollector*, v8::internal::ItemParallelJob*, v8::internal::MigrationObserver*, long) [node]
12: 0xd923ec v8::internal::MarkCompactCollector::EvacuatePagesInParallel() [node]
13: 0xd925b5 v8::internal::MarkCompactCollector::Evacuate() [node]
14: 0xda45b1 v8::internal::MarkCompactCollector::CollectGarbage() [node]
15: 0xd60878 v8::internal::Heap::MarkCompact() [node]
16: 0xd62368 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
17: 0xd642a5 v8::internal::Heap::HandleGCRequest() [node]
18: 0xd0a787 v8::internal::StackGuard::HandleInterrupts() [node]
19: 0x107c003 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [node]
20: 0x1423279 [node]
解决方法
- 尝试升级
nodejs
的版本,或重新安装nodejs
博主是把node 版本14.17.0 升级到了14.21.2 解决的