[Fixed] Error upon starting tsserver in VS Code: "TSServer exited. Code: null. Signal: SIGTERM" – Tsserver

by
Maya Patel
react-typescript tsserver visual-studio-code

Quick Fix: Try reloading VS Code with extensions disabled, closing it, and reopening it. Consider using the TypeScript: Restart TS Server or TypeScript: Reload Project commands. If the issue persists, disable the Deno extension.

The Problem:

When starting tsserver in VS Code, it fails with the error message "TSServer exited. Code: null. Signal: SIGTERM". Despite correctly identifying the right version of tsserver, the process terminates abnormally. This issue arises when the specified path to the tsserver.js file contains typos or incorrect directory structures.

The Solutions:

Solution 1: TSServer exited. Code: null. Signal: SIGTERM

Here are some possible solutions that may help resolve the “TSServer exited. Code: null. Signal: SIGTERM” issue in VS Code:

  1. Reload VS Code with Extensions Disabled:

    • Open the command palette (Ctrl/Cmd+Shift+P) and run the "Developer: Reload with Extensions Disabled" command.
    • Close and reopen VS Code.
  2. Use the TypeScript Commands:

    • In the command palette, try using the "TypeScript: Restart TS Server" or "TypeScript: Reload Project" commands.
    • These commands can sometimes resolve issues with the TS server.
  3. Check for WSL:

    • If you are running VS Code in Windows Subsystem for Linux (WSL), this error may be related to WSL.
    • Try disabling WSL or running VS Code without WSL to see if it resolves the issue.
  4. Disable the Deno Extension:

    • If you have the Deno extension enabled, try disabling it temporarily.
    • Some users have reported that this error can occur when the Deno extension is enabled.
  5. Update VS Code and TypeScript Extension:

    • Make sure you have the latest versions of VS Code and the TypeScript extension installed.
    • Updating these components may resolve the issue.

If none of the above solutions work, you can report the issue on the VS Code GitHub repository.

Q&A

What is the issue cause?

Issue is caused by Deno extension.

What are the possible workarounds?

Reload VS Code with extensions disabled.

Video Explanation:

The following video, titled "LazyVim: Linting and Formatting - YouTube", provides additional insights and in-depth exploration related to the topics discussed in this post.

Play video

This is a video about LazyVim: Linting and Formatting where I'll introduce a few baked-in linters and formatters in LazyVim, ...