windows 10 (1709)
node 10.19.0
Jest 26.0.1
机器有 32g 内存。编译和运行都没有问题,就是 jest 无法正常跑完。
这个是咋回事儿,没有头绪呢。
在 macos 下跑 jest 就没有问题
<--- Last few GCs --->
[39960:0000015619EDC4D0] 127030 ms: Scavenge 25.7 (30.5) -> 24.9 (30.5) MB, 0.8 / 0.0 ms (average mu = 0.998, current mu = 0.999) allocation failure
[39960:0000015619EDC4D0] 129628 ms: Scavenge 25.8 (30.5) -> 24.9 (30.5) MB, 1.2 / 0.0 ms (average mu = 0.998, current mu = 0.999) allocation failure
[39960:0000015619EDC4D0] 131365 ms: Scavenge 25.8 (30.5) -> 24.9 (30.5) MB, 0.8 / 0.0 ms (average mu = 0.998, current mu = 0.999) allocation failure
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 00000230F2BDC87C]
1: StubFrame [pc: 00000230F2C0FAB5]
Security context: 0x00c35e29e6e9 <JSObject>
2: initialize [0000011BDB729891] [C:\src\web-2nd\node_modules\jest-worker\build\workers\ChildProcessWorker.js:145] [bytecode=000001792A6C2509 offset=111](this=0x034bdb811831 <ChildProcessWorker map = 0000005E90AC1AD1>)
3: _onExit [0000011BDB729901] [C:\src\web-2nd\node_modules\jest-worker\build\workers\ChildP...
FATAL ERROR: Committing semi space failed. Allocation failed - JavaScript heap out of memory
1: 00007FF7C169832A v8::internal::GCIdleTimeHandler::GCIdleTimeHandler+4506
2: 00007FF7C1672DB6 node::MakeCallback+4534
3: 00007FF7C1673730 node_module_register+2032
4: 00007FF7C198C14E v8::internal::FatalProcessOutOfMemory+846
5: 00007FF7C198C07F v8::internal::FatalProcessOutOfMemory+639
6: 00007FF7C1B72874 v8::internal::Heap::MaxHeapGrowingFactor+9620
7: 00007FF7C1B6986C v8::internal::ScavengeJob::operator=+24572
8: 00007FF7C1B67EAC v8::internal::ScavengeJob::operator=+17980
9: 00007FF7C1B70BF7 v8::internal::Heap::MaxHeapGrowingFactor+2327
10: 00007FF7C1B70C76 v8::internal::Heap::MaxHeapGrowingFactor+2454
11: 00007FF7C1C9AB9B v8::internal::Factory::AllocateRawWithImmortalMap+59
12: 00007FF7C1C9D50D v8::internal::Factory::NewRawOneByteString+77
13: 00007FF7C1C9CC5A v8::internal::Factory::NewStringFromTwoByte+154
14: 00007FF7C19A7ED1 v8::String::NewFromTwoByte+385
15: 00007FF7C15F3453 v8::internal::StackGuard::ArchiveSpacePerThread+24899
16: 00007FF7C1D7FF98 v8::internal::InterpreterDispatchDescriptor::InitializePlatformIndependent+584
17: 00007FF7C1D81953 v8::internal::InterpreterDispatchDescriptor::InitializePlatformIndependent+7171
18: 00007FF7C1D821DA v8::internal::InterpreterDispatchDescriptor::InitializePlatformIndependent+9354
19: 00007FF7C1D82471 v8::internal::InterpreterDispatchDescriptor::InitializePlatformIndependent+10017
20: 00007FF7C1D806B0 v8::internal::InterpreterDispatchDescriptor::InitializePlatformIndependent+2400
21: 00007FF7C1D81135 v8::internal::InterpreterDispatchDescriptor::InitializePlatformIndependent+5093
22: 00007FF7C19E74E3 v8::internal::Object::ToInt32+12803
23: 00007FF7C1C94CE3 v8::internal::wasm::WasmCodeManager::LookupCode+51395
24: 00000230F2BDC87C
error Command failed with exit code 134.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
或者
throw er; // Unhandled 'error' event
^
Error: write EPIPE
at ChildProcess.target._send (internal/child_process.js:762:20)
at ChildProcess.target.send (internal/child_process.js:634:19)
at ChildProcessWorker.send (C:\src\web-2nd\node_modules\jest-worker\build\workers\ChildProcessWorker.js:291:17)
at WorkerPool.send (C:\src\web-2nd\node_modules\jest-worker\build\WorkerPool.js:32:34)
at Farm._process (C:\src\web-2nd\node_modules\jest-worker\build\Farm.js:129:10)
at Farm._enqueue (C:\src\web-2nd\node_modules\jest-worker\build\Farm.js:152:10)
at Farm._push (C:\src\web-2nd\node_modules\jest-worker\build\Farm.js:159:12)
at Promise (C:\src\web-2nd\node_modules\jest-worker\build\Farm.js:90:14)
at new Promise (<anonymous>)
at Farm.doWork (C:\src\web-2nd\node_modules\jest-worker\build\Farm.js:56:12)
Emitted 'error' event at:
at process.nextTick (internal/child_process.js:766:39)
at process._tickCallback (internal/process/next_tick.js:61:11)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.