我的情况是:项目使用ng5,代码量比较大,最近经常会遇到代码修改后,自动编译的时候经常会崩溃掉,提示内存足,分配不了更多内存
CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
完整错误提示如下:
Starting the development server...
<--- Last few GCs --->
[2683:0x102802a00] 69789 ms: Mark-sweep 1351.8 (1420.1) -> 1351.5 (1420.6) MB, 513.4 / 0.0 ms (average mu =0.119, current mu = 0.007) allocation failure scavenge might not succeed
[2683:0x102802a00] 70505 ms: Mark-sweep 1352.2 (1420.6) -> 1351.8 (1421.1) MB, 712.0 / 0.0 ms (average mu =0.055, current mu = 0.005) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace ==================================