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 ode.exe" ( "%~dp0 ode.exe" --max_old_space_size=10000000 "%~dp0..@angularcliin g" %* ) ELSE ( @SETLOCAL @SET PATHEXT=%PATHEXT:;.JS;=;% node --max_old_space_size=10000000 "%~dp0..@angularcliin g" %* )
修改目录: my-project/node_modules/.bin 找到 ngc.cmd :
@IF EXIST "%~dp0 ode.exe" ( "%~dp0 ode.exe" --max_old_space_size=10000000 "%~dp0..@angularcompiler-clisrcmain.js" %* ) ELSE ( @SETLOCAL @SET PATHEXT=%PATHEXT:;.JS;=;% node --max_old_space_size=10000000 "%~dp0..@angularcompiler-clisrcmain.js" %* )
前端