OS: Ubuntu 16.04
flow-bin: 0.65.0
Whenever I open up a file i get the error message 'Cannot find node in PATH. The simplest way to resolve it is install node globally'. I assume this has something to do with using nvm? What can I do to remedy this?
When I type which node i get:
/domtwlee/.nvm/versions/node/v10.4.0/bin/node
So it is installed, perhaps the extension can't detect it's path?
I have the same issue. It seems to be tied to some issue with VSCode and nvm-based node installs as a whole.
You can fix it by running nvm use before starting VSCode via command line.
Make sure you have a default node set.
list node version installed: $ nvm ls
set default: $ nvm alias default <your version number here>
use it: $ nvm use default
run code: $ code
or if you have everything set up already use a one liner: $ nvm use default; code
I made a Unity launcher .desktop file for VSCode to set the node version before launching VSCode.
You can find the gist here
Let me know if that works for you :)
@Pitt-Pauly Thanks! Seems to have fixed the issue.
I did the following to resolve this issue:
alias code=nvm use default; code in _.zshrc_ file (should work with _.bashrc_, too)Now when I start code, it picks up the default nvm version before launching code.
I find that opening a file/folder/workspace via the code CLI command solves this issue as well, without the need to add nvm use default
Most helpful comment
I have the same issue. It seems to be tied to some issue with VSCode and nvm-based node installs as a whole.
You can fix it by running
nvm usebefore starting VSCode via command line.Make sure you have a default node set.
list node version installed:
$ nvm lsset default:
$ nvm alias default <your version number here>use it:
$ nvm use defaultrun code:
$ codeor if you have everything set up already use a one liner:
$ nvm use default; code