Exited with code=-2 in Output window
See original GitHub issueWhile running a javascript code, I keep getting following message in the output window.
[Running] node "<absolute path to file>"
[Done] exited with code=-2 in 0.005 seconds
However, when code-runner.runInTerminal
is set to true
, the run command works fine in terminal window.
The command run in the output window used to run fine till a day before.
I am running on the VSCode 1.12.2
, node 7.10.0
on osx Sierra 10.12.4
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
The command exited with code 2 visual studio 2017
An error code (also exit code) of 2 means "File not found". You would check the path in your side, and also view...
Read more >sed: What does exit code 2 mean? - Super User
I've encountered problems when using Posix utils (e.g. 'find') on Windows from .bat/.cmd files, because the commands output and expect *nix- ...
Read more >CL.exe exited with code 2 in debug when a function is missing ...
I encountered an issue with CL.exe when compiling invalid C/C++. This program #include <stdio.h> static int badFunction(const char* ) { // no return...
Read more >The command exited with code 2 visual studio 2017
While I am trying to build my windows application, I am getting following error. The command "C:\repos\CommunityLive\CL_GateApp\signing\ ...
Read more >Error with visual studio build tools msvc while downloading ...
exit code: 1 ╰─> [18 lines of output] ... failed with exit code 2 [end of output] ... error: subprocess-exited-with-error.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found the culprit. It was
"code-runner.cwd": "$workspaceRoot"
. I had kept it while trying to troubleshoot some other issue. Started receiving the expected result in output window once I removed this settings.Putting this down for those who may face similar issue.
I restarted the computer. It didn’t help. I removed the vscode cache. That seems to have helped. I am not seeing this issue any more… Still not sure what was the root cause.
Thanks for all your help.