Sublime Forum

LSP intermittent start of Typescript services


I’m having a weird issue with LSP in Sublime Text 3.

Earlier today from a suggestion made by another member, I installed LSP Service package and then went to install Sourcegraph’s javascript-typescript-langserver.

This were working great, but after my work, I saved and closed my editor. I reopen my editor and I’m constantly greeted with this:

I don’t know what happened. I uninstalled and reinstalled Sourgraph’s javascript-typescript-langserver multiple times. I’ve even tried another service, Theia’s typescript-language-server and I still get the same message for that one.

I was going to uninstall and reinstall the LSP package, but the LSP servers for html and css are working fine.

Any ideas? Literally spent the bulk of my day trying to resolve this. I’ve posted an issue on Souregraph’s repo as well.



Not being able to find the executable means it’s most likely an issue with the PATH environment variable.

The fact that it worked once was maybe down to how Sublime Text was launched in that instance (via subl from a terminal that had an appropriate PATH env var exported?)

Try running this in Terminal:

  • which javascript-typescript-stdio

Assuming it’s found, note the directory it’s in (should most likely be /usr/local/bin if it was globally installed using npm).

Then in Sublime Text:

  • Open the console (Ctrl-`) and run…
  • import os
  • os.environ["PATH"]

And check whether the directory you noted before is part of the PATH that Sublime Text is aware of. If it isn’t, then either something’s wrong with your shell profile (.bash_profile, .bashrc, etc), or with the mechanism that Sublime Text uses to automatically interrogate your login shell.