VSCode shows the following alert in a prompt:
Can't find Node.js binary "node": path does not exist. Make sure Node.js is installed and in your PATH, or set the "runtimeExecutable" in your launch.json
In terminal I see an NVM path to node:
$ node --version
v12.18.4
$ echo $PATH
/home/owner/.config/nvm/versions/node/v12.18.4/bin
:/usr/local/sbin:/usr/local/bin:/usr/sbin
:/usr/bin:/sbin:/bin:/usr/games
:/usr/local/games:/snap/bin
// line breaks manually added by me for readability
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
$ npm --version
6.14.6
Does anyone know how to fix this PATH issue?
I suspect the issue is with PATH and not VsCode but am including my launch.json below in case I'm wrong.
{
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**",
"node_modules"
],
"program": "${workspaceFolder}/src/server.ts",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": [
"${workspaceFolder}/compiled/**/*.js"
],
"runtimeExecutable": "node"
}
]
}
Other Attempts to fix this
Restarting Computer - The PATH issue still presented
Adding / removing runtimeExecutable k/v pair from above config file - Also no change
update launch.json with this
"runtimeExecutable": "/usr/local/bin/node",
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