Angular-cli - ng服务 - 我收到此错误“致命错误:CALL_AND_RETRY_LAST分配失败 - JavaScript堆内存不足”

时间:2017-09-07 08:33:32

标签: javascript angular angular2-aot aot

我的共享模块文件夹中有一些未使用的组件,我没有链接到sharedmodule。 ng serve工作正常但我使用ng serve -aot时。 angular cli无法构建项目并显示错误,以在某些模块中包含那些未使用的组件。在我将未使用的组件包含在共享模块中,并再次运行ng serve --aot后,我得到以下错误

<--- Last few GCs --->

 1535982 ms: Mark-sweep 1326.9 (1409.5) -> 1326.9 (1414.5) MB, 3644.3 / 0.0 ms [allocation failure] [GC in old space requested].
 1539590 ms: Mark-sweep 1326.9 (1414.5) -> 1326.9 (1414.5) MB, 3607.0 / 0.0 ms [allocation failure] [GC in old space requested].
 1543415 ms: Mark-sweep 1326.9 (1414.5) -> 1333.3 (1409.5) MB, 3824.0 / 0.0 ms [last resort gc].
 1547177 ms: Mark-sweep 1333.3 (1409.5) -> 1339.8 (1409.5) MB, 3762.1 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

==== JS stack trace =========================================

Security context: 00000248967CFB49 <JS Object>
    2: addMapping(aka SourceMapGenerator_addMapping) [D:\CodeBakerz\cornea-web-app-rev2\corena\node_modules\source-map\lib\source-map-generator.js:~94] [pc=000000D38ECD69AF] (this=0000035C6E271ED9 <a SourceMapGenerator with map 000001DE8DCC9809>,aArgs=0000021FF7454E81 <an Object with map 000001DE8DCC9441>)
    3: /* anonymous */ [D:\CodeBakerz\cornea-web-app-rev2\corena\node_modules\source-ma...

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

0 个答案:

没有答案