increase-memory-limit icon indicating copy to clipboard operation
increase-memory-limit copied to clipboard

node12.14.0 not recognize

Open GuoSirius opened this issue 4 years ago • 4 comments

image

image

GuoSirius avatar Dec 20 '19 04:12 GuoSirius

I think we see the same issue after we switched from Node 8.11.3 (NPM 5.6) to Node 8.17.0 (NPM 6.13.4) (Angular 5 project).

ng test --single-run --sourcemaps false
"node --max-old-space-size=4095"' is not recognized as an internal or external command,

Content of ng.cmd with version 8.11.3:

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe --max-old-space-size=4095"  "%~dp0\..\@angular\cli\bin\ng" %*
) ELSE (
  @SETLOCAL
  @SET PATHEXT=%PATHEXT:;.JS;=;%
  node --max-old-space-size=4095  "%~dp0\..\@angular\cli\bin\ng" %*
)

Same file but with 8.17.0:

@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe --max-old-space-size=4095" (
  SET "_prog=%dp0%\node.exe --max-old-space-size=4095"
) ELSE (
  SET "_prog=node --max-old-space-size=4095"
  SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%"  "%dp0%\..\@angular\cli\bin\ng" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

The patching is no longer valid with the new structure of these files. Do you see a possible fix? I'm willing to submit a PR if you point me the way to go

rootix avatar Feb 19 '20 09:02 rootix

the same problem: nodejs: v14.17.4 npm: 6.14.14 It maybe a bug?

CMRdev avatar Aug 10 '21 10:08 CMRdev

image image

image

CMRdev avatar Aug 10 '21 10:08 CMRdev

I think we see the same issue after we switched from Node 8.11.3 (NPM 5.6) to Node 8.17.0 (NPM 6.13.4) (Angular 5 project).

ng test --single-run --sourcemaps false
"node --max-old-space-size=4095"' is not recognized as an internal or external command,

Content of ng.cmd with version 8.11.3:

@IF EXIST "%~dp0\node.exe" (
  "%~dp0\node.exe --max-old-space-size=4095"  "%~dp0\..\@angular\cli\bin\ng" %*
) ELSE (
  @SETLOCAL
  @SET PATHEXT=%PATHEXT:;.JS;=;%
  node --max-old-space-size=4095  "%~dp0\..\@angular\cli\bin\ng" %*
)

Same file but with 8.17.0:

@ECHO off
SETLOCAL
CALL :find_dp0
IF EXIST "%dp0%\node.exe --max-old-space-size=4095" (
  SET "_prog=%dp0%\node.exe --max-old-space-size=4095"
) ELSE (
  SET "_prog=node --max-old-space-size=4095"
  SET PATHEXT=%PATHEXT:;.JS;=;%
)
"%_prog%"  "%dp0%\..\@angular\cli\bin\ng" %*
ENDLOCAL
EXIT /b %errorlevel%
:find_dp0
SET dp0=%~dp0
EXIT /b

The patching is no longer valid with the new structure of these files. Do you see a possible fix? I'm willing to submit a PR if you point me the way to go

just replace all of "%_prog%" with %_prog% in *.cmd

Thy3634 avatar Jul 05 '22 03:07 Thy3634