I am trying to set up eglot on ubuntu and emacs 26.1. I have installed version 1.4

When I run M-x eglot I get:

[eglot] I guess you want to run `javascript-typescript-stdio', but I can't find `javascript-typescript-stdio' in PATH!

However I can't find anything about it in the instructions. Does anybody know what I have to install to make it work.

When I follow the link it takes me to a low level package that doesn't seem to correspond to an npm package.

  • FWIW: reddit.com/r/emacs/comments/a96nzz/…
    – phils
    Commented Feb 8, 2019 at 9:06
  • Looks like you want to install github.com/sourcegraph/javascript-typescript-langserver
    – phils
    Commented Feb 8, 2019 at 9:08
  • yeah I found that too, but it only has instructions for installing from source, so still looking for confirmation that that is the recommended way
    – Alex028502
    Commented Feb 8, 2019 at 9:09
  • that post is different. they have it installed on the command line, but emacs can't find it. I don't know how to install it on the command line
    – Alex028502
    Commented Feb 8, 2019 at 9:13
  • I don't write JS too much, but I think you should first install the language server, take a look at Using Language Servers in Neovim - fortes.com: > First, we need to install a Language Server for JavaScript, we’ll use javascript-typescript-langserver which you can install via Yarn by running yarn global add javascript-typescript-langserver (or npm install -g javascript-typescript-langserver if you’re still on npm). Then make sure that the directory for the executable javascript-typescript-stdio is in exec-path of Emacs.
    – whatacold
    Commented Feb 8, 2019 at 14:38

1 Answer 1


In order to use lsp for javascript you have to install its corresponding lsp-server e.g. javascript-typescript-langserver.

If you have node and npm already installed you can just install the package globally:

npm install -g javascript-typescript-langserver

If you don't have node already installed I suggest using nvm. NVM is a command line tool that lets you manage your node version. If you use it you can install different versions of node or control the exact version you want to use.

If you don't want to use nvm you can download and install node from the official site.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.