Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Could not find a valid tsserver version #411

Closed
@ghostbuster91

Description

@ghostbuster91

Hi,

I am trying to setup neovim with typescript language support through lsp. I use nix.
I already saw #336 and #28

I tried multiple things but whatever I do I always get the same error message:

RPC[Error] code_name = InternalError, message = "Request initialize failed with message: Could not find a valid tsserver version. Exiting."

I even provided explicitly path to the tsserver:

    require("lspconfig")["tsserver"].setup({
                on_attach = on_attach,
                capabilities = capabilities,
                cmd = { 
          "/nix/store/mis3pr62zjli08kdxg6lqhvkjbiih7kq-typescript-language-server-0.9.6/bin/typescript-language-server",
          "--stdio",
          "--tsserver-path",
          "/nix/store/cq9s34idhmcwqiy4jb89ghlpr6x6wiz1-typescript-4.5.5/lib/" }
    })

Calling typescript-language-server explicitly with above parameters doesn't yield any errors.

/nix/store/mis3pr62zjli08kdxg6lqhvkjbiih7kq-typescript-language-server-0.9.6/bin/typescript-language-server \
--stdio \
--tsserver-path /nix/store/cq9s34idhmcwqiy4jb89ghlpr6x6wiz1-typescript-4.5.5/lib/ \
--log-level 4 \
--tsserver-log-file=ts-logs.txt --tsserver-log-verbosity=verbose

I wish the error message was a little bit more descriptive.

Did it find tsserver at all? If so, why was it considered as invalid?

Could someone point me to a direction how can I debug that further?

Thanks in advance!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions