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 implement 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 break-point 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.
To test that you have Node.js installed correctly on your computer, open a new terminal and type node --version and you should see the current Node.js version installed.
You must click the Kill Terminal button (highlighted) and then restart VS Code and node will start working again. Best on making a change of system environment variable Path is restarting Windows to make sure that really all processes make use of the modified Path variable.
On OSX and VSCode 1.56.2 all I had to do was to close and restart VSCode and the problem went away.
first run below commands as super user sudo code . --user-data-dir='.'
it will open the visual code studio import the folder of your project and set the launch.json as below
{ "version": "0.2.0", "configurations": [ { "type": "node", "request": "launch", "name": "Launch Program", "program": "${workspaceFolder}/app/release/web.js", "outFiles": [ "${workspaceFolder}/**/*.js" ], "runtimeExecutable": "/root/.nvm/versions/node/v8.9.4/bin/node" } ] }
path of runtimeExecutable will be output of "which node"
command.
Run the server in debug mode cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With