可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
With a downloaded and installed version of Visual Studio Code 1.2.1, and a 64bit version of node.exe msi placed in my working directory (I am assuming that is correct), how do we add node and npm command line tools to be on our PATH? I am confused in understanding that statement. Where and how do we implment that? I am quoting this requirement directly from the top of this resource page - https://code.visualstudio.com/Docs/runtimes/nodejs
As a result of my current situation, I set a breakpoint in an app.js file. And when I hit F5, it tells me...
Cannot find runtime 'node' on PATH
I am completely lost in understanding and fixing this issue in Visual Studio Code.
回答1:
To follow up, I just ran into this as well. When I installed Node.js there was an option that said Add to PATH (Available After Restart). Seems like Windows just needs a restart to make things work.
回答2:
So node got kicked out of path. you can do
SET PATH=C:\Program Files\Nodejs;%PATH%
Or simply reinstall node to fix this. which ever you think is easiest for you
回答3:
Quick fix that works for me. Navigate to the root directory of your folder from command line (cmd). then once you are on your root directory, type:
code .
Then, press enter. Note the ".", don't forget it. Now try to debug and see if you get the same error.
回答4:
I also ran into this error. Restart the PC works for me.