jetlinks/jetlinks-ui-antd

在Ubuntu2022.04系统上启动的时候报错

Closed this issue · 1 comments

🧐 问题描述

执行 npm start 指令时报错,使用的nodejs版本是16.19.1,npm版本是8.19.3

🚑 报错信息如下

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb08f10 node::Abort() [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
 2: 0xa1b70e  [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
 3: 0xce19d0 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
 4: 0xce1d77 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
 5: 0xe993e5  [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
 6: 0xe99ec6  [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
 7: 0xea83ee  [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
 8: 0xea8e30 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
 9: 0xeabd25 v8::internal::Heap::HandleGCRequest() [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
10: 0xe393c7 v8::internal::StackGuard::HandleInterrupts() [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
11: 0x11e59a4 v8::internal::Runtime_StackGuardWithGap(int, unsigned long*, v8::internal::Isolate*) [/home/mars/.nvm/versions/node/v16.19.1/bin/node]
12: 0x15d9d59  [/home/mars/.nvm/versions/node/v16.19.1/bin/node]

通过设置 export NODE_OPTIONS=--max_old_space_size=4096 解决