Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/32.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular cli-ng serve--aot I收到此错误;致命错误:调用并重试上次分配失败-JavaScript堆内存不足;_Javascript_Angular_Angular2 Aot_Aot - Fatal编程技术网

Angular cli-ng serve--aot I收到此错误;致命错误:调用并重试上次分配失败-JavaScript堆内存不足;

Angular cli-ng serve--aot I收到此错误;致命错误:调用并重试上次分配失败-JavaScript堆内存不足;,javascript,angular,angular2-aot,aot,Javascript,Angular,Angular2 Aot,Aot,我的共享模块文件夹中有一些额外的未使用组件,我没有链接到sharedmoduleng serve效果很好,但当我使用ng serve-aot时。angular cli无法生成项目,并显示错误以在某些模块中包含未使用的组件。在我将未使用的组件包括在共享模块中,并再次运行ngserve--aot之后,我得到以下错误 <--- Last few GCs ---> 1535982 ms: Mark-sweep 1326.9 (1409.5) -> 1326.9 (1414.5) M

我的共享模块文件夹中有一些额外的未使用组件,我没有链接到sharedmodule<代码>ng serve效果很好,但当我使用
ng serve-aot
时。angular cli无法生成项目,并显示错误以在某些模块中包含未使用的组件。在我将未使用的组件包括在共享模块中,并再次运行
ngserve--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

1535982毫秒:标记扫描1326.9(1409.5)->1326.9(1414.5)MB,3644.3/0.0毫秒[分配失败][请求旧空间中的GC]。
1539590毫秒:标记扫描1326.9(1414.5)->1326.9(1414.5)MB,3607.0/0.0毫秒[分配失败][请求旧空间中的GC]。
1543415毫秒:标记扫描1326.9(1414.5)->1333.3(1409.5)MB,3824.0/0.0毫秒[最后的gc]。
1547177毫秒:标记扫描1333.3(1409.5)->1339.8(1409.5)MB,3762.1/0.0毫秒[最后的gc]。
==JS堆栈跟踪=========================================
安全上下文:0000024896749
2:addMapping(又名SourceMapGenerator_addMapping)[D:\CodeBakerz\corna-web-app-rev2\corena\node\u modules\source map\lib\source map generator.js:~94][pc=000000 D38ECD69AF](this=00000 35C6E271ED9,aArgs=00000 21FF7454E81)
3:/*匿名*/[D:\CodeBakerz\corna-web-app-rev2\corena\node\u modules\source ma。。。
致命错误:调用和重试上次分配失败-JavaScript堆内存不足