Help debugging tsserver

Hello, I am pretty new here.
I have used the nvim lsp with clang and jdtls for a while now and since now my interests require me to play around with web dev, I wanted to try out tsserver on lsp. But for some reason the client keeps crashing with exit code 1 and signal 0. I tried printing vim.lsp.buf.list_workspace_folders() but it always comes as an empty array. I have no issues with other lsps and I even tried the default config, so i know that this is not an issue with my config.

I am running ubuntu 21.10 and latest nodejs 14. My debug log is here

Hi, welcome :slight_smile:

I would guess it’s an issue with your node environment, typescript install, or typescript language server install. I made a test container for you here to show the instructions (on alpine) of how to install everything (the package names should be the same).

podman run --rm -it docker.io/mjlbach/try.nvim:slim-typescript

Hopefully this can help, but otherwise maybe someone else has experience with similar issues causing node programs to crash.

Apparently it was an issue with the nodejs installation. Reinstalling node via apt helped. Thanks.

1 Like

I wholeheartedly recommend https://volta.sh/