vim-lsp-settings
vim-lsp-settings copied to clipboard
Couldn't find 'tsserver' executable or 'tsserver.js' module
Failed to initialize typescript-language-server with error -32603: Request initialize failed with message: Couldn't find 'tsserver' executable or 'tsserver.js' module
I ran the installation as described in README.md, yet am getting this error. How do I solve it?
I realize this is because I didn't install typescript globally:
https://github.com/prabirshrestha/vim-lsp/wiki/Servers-JavaScript
Shouldn't this be handled by :LspInstallServer?
@jsit
:LspInstallServer already has the typescript (tsserver) package installed and the tsserver command in it.
See: https://github.com/mattn/vim-lsp-settings/blob/master/installer/install-typescript-language-server.sh
vim-lsp-settings prioritizes commands on the system's PATH.
If you have installed typescript-language-server globally, the global side of typescript-language-server will be invoked.
In that case, you need to install typescript globally and the tsserver module needs to be present.
Also, tsserver local to the project is fine.
run npm i -g typescript typescript-language-server
Is there a reason why typescript-language-server is used instead of directly using tsserver?