'VSCode - TypeScript language service died unexpectedly 5 times in the last 5 minutes

This error message keeps sliding down from the top every few seconds. I click on the close button and it comes back again. I am not and don't plan on using TypeScript in any of my projects.

enter image description here

Is there a way to "silent" this warning message?
Is there a way to change the frequency that the warnings slide down on the screen?

This is happening in VSCode 1.8.1 and 1.9 on Windows 10 and Windows 8.



Solution 1:[1]

I work on TypeScript for VSCode.

The TypeScript language service powers language features for both TypeScript and JavaScript code. Without it, you do not get any suggestions or intellisense or any other nice language support.

Please open an issue against VSCode if you are seeing this error. You can also try upgrading the version of TypeScript that VS Code uses to pick up the latest fixes and features: https://code.visualstudio.com/Docs/languages/typescript#_using-newer-typescript-versions

(I'm also looking into a better way to handle this message since it can be very spammy when the TypeScript service crashes continually)

Solution 2:[2]

I resolve my problem by use this way:

  1. first, open your typescript.tsserver.log to "verbose" enter image description here

  2. restart vscode, and open ts log enter image description here

  3. and you will find when make your tsserver so slow, as for me, jest_cache is the problem. so I add a exclude in my tsconfig.json
    enter image description here

  4. restart, and the problem solve.

Solution 3:[3]

you can try to install this vscode extension to make vscode use latest typescript version

Solution 4:[4]

To people getting here using WSL2 & Ubuntu(?)

rm -rf ./vscode-server worked for me

Solution 5:[5]

I the same problem with VSCode using a workspace Yarn and Typescript. After a couple months without a solution, I tried updating the Yarn VSCode SDK using yarn dlx @yarnpkg/sdks vscode as part of these instructions and that fixed my problem.

Solution 6:[6]

Disabling the "JavaScript and TypeScript Nightly" extension worked for me.

The error always said that the workspace was using an old verison of typescript and that I should upgrade although I was up to date. It looks the workspace was using the latest dev build of typescript because of the extension or something like that maybe caused the error.

Solution 7:[7]

For a temprary solution you need to rollback to an older version. In my case it worked with: https://code.visualstudio.com/updates/v1_39.

Solution 8:[8]

upgrading to TypeScript v3.7.3 and using VSCode Insider's Edition seems to fix the issue for me.

There are multiple ways to upgrade. One way is:

yarn add -D [email protected]

enter image description here

https://github.com/microsoft/vscode/issues/84618#issuecomment-562290275

Solution 9:[9]

Here is my solution which I spent 1 week.

  • Fallback version to Version: 1.61.2 (Universal)
  • Rmove your local VsCode totaly.
    • quit it
    • remove it from your Application folder
    • remove the file ~/.vscode
      • rm -rf ~/.vscode
  • Install the vsCode v1.61.2 and open it;
  • Close the aoto update. it's important
    • find the menu Code > preferences > settings
    • search keyword of update
    • set Application/Update/update > mode > none
  • Open your ts project

Hope help you

Solution 10:[10]

took me a few confusing days, as it kept trying to default to 16.8 which I had not installed via nvm

I installed and un-installed 16.8, set the default and system aliases (always alias to a version number without any letters ['v']

Finally I found a posting that said, no matter what you have installed for nvm MacOS will always use the system Node if there is one.

So: brew uninstall node got rid of a version that I didn't was on my mac... I've been using nvm for many years, so I don't know how it got there. Perhaps it came in as a dependency...

Since I use nvm, and always want the typescript support I pinned it to a particular version of node that I know has typescript installed globally

tsdk: /Users/ajoslin/.nvm/versions/node/v16.14.0/lib/node_modules/typescript/lib/

Solution 11:[11]

In my case, I didn't have the typescript compiler (tsc) installed on my system. So npm install -g typescript resolve my problem.