当前位置: 首页 > 知识库问答 >
问题:

Angular-cli AOT构建失败,出现“致命错误:CALL_AND_RETRY_LAST分配失败-JavaScript堆内存不足”

张锐藻
2023-03-14

我试图用AOT构建我的angular-cli项目

ng build --aot

你知道吗?

共有1个答案

桓高澹
2023-03-14

GitHub上已经打开了一个问题:https://github.com/angular/angull-cli/issues/5618

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

node --max_old_space_size=4096 ./node_modules/@angular/cli/bin/ng build --prod
 类似资料: