Running the contributed command: 'code-runner.stop' failed

≡放荡痞女 提交于 2021-02-11 12:32:37

问题


None of the JavaScript Programs that I have written over the past few months are working. So today, I am back at JS-101.

I have a Node.js Module called app.js, stored in a folder called Test-02

Here is the complete program:

console.log('Hello World'); 

When I go into the Command Prompt and run the program, the output is what you would expect: Hello World

When I run the program from the Visual Studio Code Terminal, I type >node app.js and the result is what you would expect: Hello World

But when I try to run the program with the Code-Runner extension in VS Code ( CNTRL + ALT + N ), I get a message that says,

[Running] node "d:\...\Test-02\app.js"

But there is no 'Hello World' output ... nor is there any message that says [Done] exited with code=0 in 0.135 seconds "Hello World" is stuck in an infinite loop of [Running].

However, when I attempt to stop the program, using the Code-Runner 'stop' command ( CNTRL + ALT + M ), I get the dreaded Error Message: Running the contributed command: 'code-runner.stop' failed

Not only is the 'Hello World' program not working ... NONE of the Node.js Modules that I have written over the past few months are working. But everything that I have said above is not really the problem. All of that is only a symptom of the problem.

The real problem is the thing that CAUSED all of my programs to break.

I have a Module stored in a folder called Test-01 that I wrote a few days ago. The Module that is inside of that folder is one that I copied off of a YouTube video:

https://www.youtube.com/watch?v=-RCnNyD0L-s

That Node.js Module contains stuff like express, bcrypt, and ejs.

Now here is the Kicker: If I try to Re-Name the folder: Test-01, then the 'Hello World' program ( the one that is stored in folder Test-02 ) will break in the manner that I described.

I can delete every single thing out of Test-01 with no ill effects. But I cannot re-name the folder, nor can I delete the ( empty ) folder. If I try to do that, then the Code-Runner extension in VS Code will tell me that all of my software no longer works.

But I can fix the problem as easily as I can break it. All I have to do is put a new folder there, and call it Test-01.

I honestly don't know where the gremlins are coming from in this bizarre scenario. It seems to be related to folder Test-01. But really, the only thing that is truly "Broken" is the Code-Runner extension in VS Code. Code-Runner is the thing that tells me that there is no output from 'Hello World'.

In case anyone wants to know, "Yes" I have tried UN-installing, and re-installing 'Code-Runner'. But since I have never been able to locate the actual installation folder for 'Code Runner', I can't really tell if the uninstall really worked. Microsoft tries very hard to hide stuff like that from enquiring minds like mine.

I am working on a Windows computer, running Windows 8.1 Can anyone help me out here ?

来源:https://stackoverflow.com/questions/65712487/running-the-contributed-command-code-runner-stop-failed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!