I had some extra un-used components in my shared module folder, which i did not link to sharedmodule. ng serve worked fine but when I used ng serve -aot. angular cli is failed to build project and displayed errors to include those un-used components in some module. after I included the un-used components in shared module, and again running ng serve --aot I get this below error

<--- 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

There are 0 best solutions below