sourcegraph / javascript-typescript-langserver

JavaScript and TypeScript code intelligence through the Language Server Protocol
https://sourcegraph.com
Apache License 2.0
792 stars 72 forks source link

How to install? #555

Closed mvrozanti closed 5 years ago

mvrozanti commented 5 years ago

I'm not sure why one would want to just npm i this project, like it says in the README.

With that said, I tried to npm i -g and got the following dependency problems:

npm WARN tslint-language-service@0.9.9 requires a peer of typescript@>= 2.3.1 < 3 but none is installed. You must install peer dependencies yourself.

npm ERR! path /home/nexor/.npm/lib/node_modules/.staging/javascript-typescript-langserver-ff8b9563/node_modules/@babel/code-frame
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall rename
npm ERR! enoent ENOENT: no such file or directory, rename '/home/nexor/.npm/lib/node_modules/.staging/javascript-typescript-langserver-ff8b9563/node_modules/@babel/code-frame' -> '/home/nexor/.npm/lib/node_modules/.staging/@babel/code-frame-ce9e735c'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nexor/.npm/_logs/2019-01-27T21_20_21_583Z-debug.log

My naive intuition lead me to npm i -g typescript@2.3.1, which succesfully installs that specific version of typescript. So, I should be able to install this project now, right?

Wrong, the same error pops up. What is going on?

ianyepan commented 5 years ago

Have you tried this: npm install -g javascript-typescript-langserver?

You can also checkout this page: https://lsp.readthedocs.io/en/latest/#language-specific-setup

mvrozanti commented 5 years ago

I think I got it working installing it through coc-nvim, but thanks