Cannot find runtime 'node' on PATH - Visual Studio Code and Node.js
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