egret编译 FATAL ERROR: CALL_AND_RETRY_0 Allocation failed process out of memory解决

egret 白鹭编译时异常提示: FATAL ERROR: CALL_AND_RETRY_0 Allocation failed process out of memory.
 编译时内存溢出, 因为白鹭编译时使用的自带的32位nodejs, 可换自己安装的64位的nodejs.
解决方法:
1.安装个64位的nodejs, 如果安装在D:\Program Files\nodejs
2.修改C:\Users\登录用户名\AppData\Roaming\npm\egret.cmd文件, 设置路径为我们安装的64位nodejs
@SET NODE64=D:\Program Files\nodejs
@IF EXIST "%~dp0node_modules\egret\EgretEngine" (
  FOR /F "usebackq delims=" %%a in ("%~dp0node_modules\egret\EgretEngine") do @(set EGRET=%%a)
) ELSE (
  set EGRET=%~dp0node_modules
)

@IF EXIST "%NODE64%\node.exe" (
  "%NODE64%\node.exe" --max-old-space-size=4000 "%EGRET%\selector.js" %*
) ELSE (
  @SETLOCAL
  @SET PATHEXT=%PATHEXT:;.JS;=;%
  node --max-old-space-size=4000 "%EGRET%\selector.js" %*
)

  

猜你喜欢

转载自www.cnblogs.com/barrysgy/p/10598348.html