sourcegraph / javascript-typescript-langserver

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

Attempting to access node_modules files fails even though they exist #633

Open tsujp opened 4 years ago

tsujp commented 4 years ago

Sublime LSP.

javascript-typescript-langserver: readFile <path_to_folder>/node_modules/@babel/types/lib/index.d.ts requested by TypeScript but content not available

I've ls'd this folder, that file definitely exists. I am stuck with a permanent eslint(erred) on my status bar as this won't budge.

ohcibi commented 4 years ago

I'm running into the same issue using neovim and its languageclient pluin. I found out that once you open a file in question within the current nvim session, that specific file gets parsed correctly. If that file is importing other files from node_modules as well there will be other errors regarding those imports of course.

@tsujp maybe you could try if opening a reported file in sublime makes the language server recognize the file properly as well.

tsujp commented 4 years ago

I ended up just switching to typescript-language-server found here: https://github.com/theia-ide/typescript-language-server

It's not a solution in so far as this is an issue relating to this repo of course, but I haven't had any problems since swapping.

Ryan-Kalinowski commented 4 years ago

I ran into the same issue with neovim and https://github.com/autozimu/LanguageClient-neovim. I also switched to a different language server implementation, and it's working just fine. You're bleeding users!