Open GuoSirius opened 4 years ago
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
the same problem: nodejs: v14.17.4 npm: 6.14.14 It maybe a bug?
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