gpt4 book ai didi

node.js - Angular-cli AOT 构建失败,出现 "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"

转载 作者:搜寻专家 更新时间:2023-11-01 00:20:02 32 4
gpt4 key购买 nike

我正在尝试使用 AOT 构建我的 angular-cli 项目

ng build --aot

但它因错误而失败

"FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory"

如果我使用 --prod 标志进行构建,也会发生同样的事情。

有什么想法吗?

最佳答案

github 上已经有一个问题:https://github.com/angular/angular-cli/issues/5618

同时,作为解决方法,您可以尝试指定 max_old_space_size 设置(以 MB 为单位)

node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --prod

关于node.js - Angular-cli AOT 构建失败,出现 "FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49230139/

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