首页 > 编程语言 > 详细

angular 内存泄露 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

时间:2021-03-17 14:52:17      阅读:32      评论:0      收藏:0      [点我收藏+]

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" %*
)

前端

技术分享图片

 

angular 内存泄露 FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory

原文:https://www.cnblogs.com/xiaobing-R/p/14548717.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!