angular 内存泄露 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
angular 内存泄露 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
解决办法(亲测可用)
解决方法:手动改写内存上限
修改目录: my-project/node_modules/.bin 找到 ng.cmd :
@IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" --max_old_space_size=10000000 "%~dp0\..\@angular\cli\bin\ng" %* ) ELSE ( @SETLOCAL @SET PATHEXT=%PATHEXT:;.JS;=;% node --max_old_space_size=10000000 "%~dp0\..\@angular\cli\bin\ng" %* )
修改目录: my-project/node_modules/.bin 找到 ngc.cmd :
@IF EXIST "%~dp0\node.exe" ( "%~dp0\node.exe" --max_old_space_size=10000000 "%~dp0\..\@angular\compiler-cli\src\main.js" %* ) ELSE ( @SETLOCAL @SET PATHEXT=%PATHEXT:;.JS;=;% node --max_old_space_size=10000000 "%~dp0\..\@angular\compiler-cli\src\main.js" %* )
前端