Ric*_*rdo 4 production compilation angular angular5
我只是将我的项目从4角升级到5.测试部署过程我面临这个问题:编译过程永远不会结束:我正在运行此命令:
ng build --prod
Run Code Online (Sandbox Code Playgroud)
我的版本如下:Angular CLI:1.6.4节点:8.2.1操作系统:darwin x64 Angular:5.2.0 ...动画,通用,编译器,编译器 - cli,核心,表单...... http,平台 - 浏览器,平台浏览器动态...平台服务器,路由器
@angular/cli: 1.6.4
@angular-devkit/build-optimizer: 0.0.38
@angular-devkit/core: 0.0.25
@angular-devkit/schematics: 0.0.48
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.4
@schematics/angular: 0.1.13
@schematics/schematics: 0.0.13
typescript: 2.6.2
webpack: 3.10.0
Run Code Online (Sandbox Code Playgroud)
节点进程占用了大量内存.这是我的显示器的输出
PID COMMAND %CPU TIME #TH #WQ #PORT MEM PURG CMPRS PGRP PPID STATE BOOSTS %CPU_ME %CPU_OTHRS UID FAULTS COW
9575 node 143.4 28:24.52 11/1 1 48 1691M+ 0B 0B 29574 29574 running *0[1] 0.00000 0.00000 501 908303+ 352
29574 node 0.0 00:00.60 11 1 51 32M 0B 0B 29574 29518 sleeping *0[1] 0.00000 0.00000 501 15062 342
Run Code Online (Sandbox Code Playgroud)
ng build命令只显示
11% building modules 11/23 modules 12 active ...orgchart/dist/css/jquery.orgchart.cssNode#moveTo was deprecated. Use Container#append.
92% chunk asset optimization
Run Code Online (Sandbox Code Playgroud)
任何想法如何解决这个问题?像往常一样完成我的编译过程?提前致谢
在大型项目上遇到同样的问题,最后它通常会崩溃.管理以通过向节点添加更多资源来修复它.
"build": "node --max-old-space-size=4096 ./node_modules/@angular/cli/bin/ng build --aot --prod",
Run Code Online (Sandbox Code Playgroud)
npm run build
归档时间: |
|
查看次数: |
1606 次 |
最近记录: |