我在ng build
时面临异常(为差异加载生成ES5Bundle 包.)
An unhandled exception occured: Call retires were exceeded
旧版本:
- 电话:
8.3.20
- Angular :
8.2.7
- node :
12.12.1
同样在日志(log)中,也提到
[error] Error: Call retries were exceeded at ChildProcessWorker.initialize
我在ng build
时面临异常(为差异加载生成ES5Bundle 包.)
An unhandled exception occured: Call retires were exceeded
旧版本:
8.3.20
8.2.7
12.12.1
同样在日志(log)中,也提到
[error] Error: Call retries were exceeded at ChildProcessWorker.initialize
这是@angular/cli
的问题.将版本更新为>= 8.3.22
应该可以解决这个问题:see this comment in #16515
基本上,构建过程正在耗尽内存:请参阅相关问题#15493#16515
建议的补救措施是:
12.14.0
package.json
中,将"build"
脚本更改为:node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng build
4GB
作为一个简单的例子,它也可以使用旧版本的angular/cli
和build-angular
:
"devDependencies": {
"@angular-devkit/build-angular": "0.803.20",
"@angular/cli": "8.3.20",
如果需要,另一个解决方法是禁用differential-loading(即跳过ES5Bundle 包的生成).那么构建过程将需要较少的内存,并且可以工作.