You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Visual Studio 15 Community \ C++ Tools \ SDK
VS Code: 1.9.1 master release
Node: 6.9.1
NPM: 3.10.8
Description Of Bug:
npm.bat will fail on Windows if the vscode code tree/repository is in a subdirectory
with any directories with spaces in the path. The error does not fatally
stop the script making it easy to miss the "cannot open" output from
the npm script. The error also does not show up in the npm_debug.txt
file after many modules have been processed.
The bug is in line five, in the findstr command -
5 for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:""electronVersion":.*" %~dp0..\package.json') do set npm_config_target=%%~a
The file string: %~dp0..\package.json
Will to evaluate to multiple files/folders for any path with spaces and folder names.
Thus %electronVersion does not get set but no fatal error stops the script.
Since the command output gets overrun from the npm output it's easy to miss the warning.
The actual error building electron comes much later and gives no clue as to the cause
(empty electronVersion value)
Steps to reproduce:
(working example) CheckOut code to: C:\Dev\vscode
(failure example) CheckOut code to: C:\VSC Dev\vscode
(Initial output to terminal NOT npm_debug_out)
FINDSTR: Cannot open C:\VSC
FINDSTR: Cannot open Dev\vscode\scripts..\package.json
...subsequent npm output until electron failure
The Fix: Simply enclose the full file path string in double quotes
5 for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:""electronVersion":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a
I also added an error level output so code.bat could detect an error.
Additionally command output with an explicit fatal error.
Can I submit these fixes? I am embarrassed, but it took me three days
to catch this as all other similar issues I read on github pointed
to a toolchain issue. There our problems with the C++ tools install
that can lead you down a wrong path. I would like to add some notes
to the contribution wiki page.
Looking forward to contributing especially for accessibility
as a disabled\ALS user using voice programming - I really love
the vscode editor !
Cheers Christopher
The text was updated successfully, but these errors were encountered:
Development Environment:
OS: Windows 7 Professional SP1
Visual Studio 15 Community \ C++ Tools \ SDK
VS Code: 1.9.1 master release
Node: 6.9.1
NPM: 3.10.8
Description Of Bug:
npm.bat will fail on Windows if the vscode code tree/repository is in a subdirectory
with any directories with spaces in the path. The error does not fatally
stop the script making it easy to miss the "cannot open" output from
the npm script. The error also does not show up in the npm_debug.txt
file after many modules have been processed.
The bug is in line five, in the findstr command -
5 for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:""electronVersion":.*" %~dp0..\package.json') do set npm_config_target=%%~a
The file string: %~dp0..\package.json
Will to evaluate to multiple files/folders for any path with spaces and folder names.
Thus %electronVersion does not get set but no fatal error stops the script.
Since the command output gets overrun from the npm output it's easy to miss the warning.
The actual error building electron comes much later and gives no clue as to the cause
(empty electronVersion value)
Steps to reproduce:
(working example) CheckOut code to: C:\Dev\vscode
(failure example) CheckOut code to: C:\VSC Dev\vscode
(Initial output to terminal NOT npm_debug_out)
FINDSTR: Cannot open C:\VSC
FINDSTR: Cannot open Dev\vscode\scripts..\package.json
...subsequent npm output until electron failure
The Fix: Simply enclose the full file path string in double quotes
5 for /f "tokens=2 delims=:, " %%a in ('findstr /R /C:""electronVersion":.*" "%~dp0..\package.json"') do set npm_config_target=%%~a
I also added an error level output so code.bat could detect an error.
Additionally command output with an explicit fatal error.
Can I submit these fixes? I am embarrassed, but it took me three days
to catch this as all other similar issues I read on github pointed
to a toolchain issue. There our problems with the C++ tools install
that can lead you down a wrong path. I would like to add some notes
to the contribution wiki page.
Looking forward to contributing especially for accessibility
as a disabled\ALS user using voice programming - I really love
the vscode editor !
Cheers Christopher
The text was updated successfully, but these errors were encountered: