Angular 2 Aot Error: FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory

前端 未结 2 1838
忘了有多久
忘了有多久 2021-01-21 06:07

While Running Angular 2 AOT rollup I have faced above issue

<--- Last few GCs --->

  144518 ms: Mark-sweep 1317.0 (1404.4) -> 1317.0 (1404.4) MB, 1522         


        
2条回答
  •  别那么骄傲
    2021-01-21 07:03

    Tried almost all the options but no luck,

    JUST increased Virtual memory and it worked :-)

    Permanent fix(Commands are for Windows :

    For Compilation:

    node --max-old-space-size=8192 node_modules/@angular/compiler-cli/src/main.js -p tsconfig-aot.json
    

    For Rollup:

    node --max-old-space-size=8192 node_modules/rollup/bin/rollup -c rollup-config.js
    

提交回复
热议问题