gpt4 book ai didi

javascript - Angular 2 Aot 错误 : FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

转载 作者:太空狗 更新时间:2023-10-29 18:20:40 26 4
gpt4 key购买 nike

在运行 Angular 2 AOT rollup 时我遇到了上述问题

<--- Last few GCs --->

144518 ms: Mark-sweep 1317.0 (1404.4) -> 1317.0 (1404.4) MB, 1522.9 / 0.0 ms [allocation failure] [GC in old space requested].
146029 ms: Mark-sweep 1317.0 (1404.4) -> 1317.0 (1404.4) MB, 1511.6 / 0.0 ms [allocation failure] [GC in old space requested].
147566 ms: Mark-sweep 1317.0 (1404.4) -> 1321.2 (1403.4) MB, 1536.2 / 0.0 ms [last resort gc].
149101 ms: Mark-sweep 1321.2 (1403.4) -> 1325.4 (1403.4) MB, 1535.4 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 00000307662CFB61 <JS Object>
2: _serializeMappings(aka SourceMapGenerator_serializeMappings) [D:\Project\node_modules\source-map\lib\source-map-generator.js:~291] [pc=000000F947F15D25] (this=000003C713710939 <a SourceMapGenerator with map 00000042D86F6C51>)

npm:4.1.2

Node :6.9.1

操作系统:Windows 10

我已经尝试过安装最新的 npm 和设置 max_old_sapce_size 大小但无法设置的选项

node --max_old_space_size 4096

错误:缺少标志值 --max_old_space_size 类型的 int尝试 --help 选项 Node :错误选项:--max_old_space_size

无法增加堆大小?有什么想法吗?

最佳答案

尝试了几乎所有的选项,但没有成功,

只是增加了虚拟内存并且它起作用了:-)

永久修复(命令适用于 Windows:

编译用:

node --max-old-space-size=8192 node_modules/@angular/compiler-cli/src/main.js -p tsconfig-aot.json

对于汇总:

node --max-old-space-size=8192 node_modules/rollup/bin/rollup -c rollup-config.js

关于javascript - Angular 2 Aot 错误 : FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41955769/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com