node.js在构建时内存不足

myss37ts  于 2021-09-13  发布在  Java
关注(0)|答案(0)|浏览(238)

我的react应用程序的构建失败了(经过两天的试用)可怕的“javascript内存不足”。
我在许多帖子中尝试过这些建议,包括:
这一个(“在第十次尝试之后,你可以说你已经尝试了‘许多和任何’选项)。
但所有这些都会导致失败。

<--- Last few GCs --->

[12207:0x4e75380]   177858 ms: Mark-sweep (reduce) 2044.8 (2080.0) -> 2042.4 (2073.5) MB, 938.5 / 0.1 ms  (+ 350.7 ms in 41 steps since start of marking, biggest step 18.9 ms, walltime since start of marking 1302 ms) (average mu = 0.154, current mu = 0.10[12207:0x4e75380]   177863 ms: Scavenge 2043.5 (2073.5) -> 2042.6 (2074.5) MB, 2.6 / 0.0 ms  (average mu = 0.154, current mu = 0.103) allocation failure 

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb200e0 node::Abort() [node]
 2: 0xa3c157 node::FatalError(char const*, char const*) [node]
 3: 0xd083ae v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xd08727 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xee9785  [node]
 6: 0xeea2cc  [node]
 7: 0xef8269 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 8: 0xefb5ac v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 9: 0xec000c v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
10: 0x123695b v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
11: 0x1640839  [node]

奇怪的是,同一个项目未能加载firebase依赖项GoogleGax中的某些包。

由(可能是)错误的“require”调用引起

内存错误是否与此google软件包“拼写错误”有关。项目中隐藏的东西的反映。
p、 d:此错误仅发生在该分支中。同一项目的其他分支不会失败。
p、 d:google gax错误要求(手动)修改mut,以便编译(或尝试这样做)项目。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题