While attempting to install YouCompleteMe for vim and enable support for Java and Javascript, I followed the instructions provided here. My command was:
sudo /usr/bin/python3.6 ./install.py --java-completer --ts-completer
Unfortunately, I encountered an error message during the installation process:
...
[100%] Linking C shared library /home/vagrant/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/cregex/regex_3/_regex.so
[100%] Built target _regex
Downloading jdt.ls from http://download.eclipse.org/jdtls/snapshots/jdt-language-server-0.54.0-202004152304.tar.gz...
Extracting jdt.ls to /home/vagrant/.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls/target/repository...
Done installing jdt.ls
ERROR: Unable to find executable 'npm'. npm is required to install TSServer.
The strange part is that npm is already in my PATH as confirmed by the following commands:
=> npm -v
6.13.4
=> which npm
/home/vagrant/.nvm/versions/node/v8.17.0/bin/npm
Any insights into why the installation of YouCompleteMe with ts-completer support is failing?