zealzhangzK零S
使用 npm 打包时,内存溢出,Jenkins 的内存已经调大了,但是nodejs的容器是每次打包的时候才新建的,不知道去哪调。错误日志如下:
+ npm run build
> ant-design-pro@2.3.1 build /home/jenkins/agent/workspace/energygqnkm/antd
> umi build
[info] [webpackbar] Compiling Webpack
[BABEL] Note: The code generator has deoptimised the styling of /home/jenkins/agent/workspace/energygqnkm/antd/node_modules/@antv/g6/dist/g6.min.js as it exceeds the max of 500KB.
[BABEL] Note: The code generator has deoptimised the styling of /home/jenkins/agent/workspace/energygqnkm/antd/node_modules/bizcharts/umd/BizCharts.js as it exceeds the max of 500KB.
<--- Last few GCs --->
[297:0x3753b50] 477554 ms: Mark-sweep 1382.2 (1424.8) -> 1382.2 (1424.8) MB, 796.2 / 0.0 ms (average mu = 0.071, current mu = 0.000) allocation failure GC in old space requested
[297:0x3753b50] 478316 ms: Mark-sweep 1382.2 (1424.8) -> 1382.2 (1424.8) MB, 761.9 / 0.0 ms (average mu = 0.037, current mu = 0.000) last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x2671afadbe1d]
Security context: 0x214cb579e6e9 <JSObject>
1: /* anonymous */ [0x2f7ae09b95d9] [/home/jenkins/agent/workspace/energygqnkm/antd/node_modules/@umijs/deps/compiled/webpack/4/bundle4.js:~86935] [pc=0x2671b3073a1c](this=0x003553c022e1 <SourceNode map = 0x1f90382959c9>,chunk=0x3c6e98e03a61 <SourceNode map = 0x1f90382959c9>)
2: arguments adaptor frame: 3->1
3: SourceNode_add [0xd7f484d2009] [/ho...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x8fa0c0 node::Abort() [umi]
2: 0x8fa10c [umi]
3: 0xb0026e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [umi]
4: 0xb004a4 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [umi]
5: 0xef49b2 [umi]
6: 0xef4ab8 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [umi]
7: 0xf00b92 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [umi]
8: 0xf014c4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [umi]
9: 0xf029d9 v8::internal::Heap::CollectAllAvailableGarbage(v8::internal::GarbageCollectionReason) [umi]
10: 0xf0419e v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [umi]
11: 0xecd226 v8::internal::Factory::AllocateRawArray(int, v8::internal::PretenureFlag) [umi]
12: 0xecdaaa v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::Heap::RootListIndex, int, v8::internal::Object*, v8::internal::PretenureFlag) [umi]
13: 0xece067 v8::internal::Factory::NewUninitializedFixedArray(int, v8::internal::PretenureFlag) [umi]
14: 0xe813ef [umi]
15: 0x1127b2d v8::internal::Runtime_GrowArrayElements(int, v8::internal::Object**, v8::internal::Isolate*) [umi]
16: 0x2671afadbe1d
/home/jenkins/agent/workspace/energygqnkm/antd@tmp/durable-68d7d316/script.sh: line 1: 286 Aborted (core dumped) npm run build
script returned exit code 134