'Visual Studio code TypeScript language service died

have anyone faced with such a problem in VS Code : "The TypeScript language service died 5 times right after it got started" . Screens are below by link :

enter image description here

enter image description here

( Cannot paste screens due to low reputation =( for now )

I use the latest TypeScript (4.5.2), so there no basic solution . When I start VS code extension works well bit then fails. Have anyone faces with it?



Solution 1:[1]

If the issue is related to this, we can fix it by updating the typescript version to latest - v4.5.5

npm i -g typescript
# or
npm i -g [email protected]

Update your vs-code to use this latest version of typescript.

  1. Open vs code settings.
  2. Search for tsdk
  3. Update the path to globally installed typescript location. Example location for mac - /usr/local/lib/node_modules/typescript/lib
  4. Restart your vs code

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1