98

I'm new to TS. I'm seeing instructions to use the command panel to"Restart TS server".

But this option is not there.

Is this a particular extension?

4 Answers 4

225
+250
  1. You'll need to have a .js, .ts or .tsx file focused in the editor.

  2. Then Open the command palette

    • Mac: Cmd + Shift + P
    • Win: Ctrl + Shift + P
  3. Then type restart and the option should be available.

    screenshot

7
  • 13
    it doesnt show up for me. Do you know what could've gone wrong?
    – superninja
    Commented Apr 10, 2021 at 0:16
  • 13
    NOTE: Make sure you're not on a diff (working tree view) as that won't trigger the option in the menu
    – bonum_cete
    Commented Jul 15, 2021 at 19:05
  • 2
    if it is possible vscode should allow you to trigger restart of ts server even if you are on a diff as long as it is a .js, .ts or .tsx file
    – kimbaudi
    Commented Jul 30, 2021 at 17:27
  • 10
    For the Vue devs out there: if you use Volar, the command to restart the server is "Volar: Restart Vue server". Relevant GitHub comment: github.com/microsoft/vscode/issues/…
    – Joe Maffei
    Commented Aug 12, 2022 at 23:45
  • 4
    The "TypeScript: Restart TS Server" command didn't appear for me until I enabled "Tsserver: Use Syntax Server" in user settings. Its JSON config is: "typescript.tsserver.useSyntaxServer": "always".
    – Etrain
    Commented Sep 2, 2022 at 16:00
18

check if you have randomly disabled typescript and javascript language features builtin extension.

Switch to extensions tab and search with @builtin.

Find it and Enable it!

enter image description here

6
  • 3
    Thanks, this was my case on a WSL 2 install, doing this allowed back all intelisense functionality again in JS and TS Commented Jan 19, 2023 at 16:42
  • Thank you - I wasted 2 hours searching internet and various trial&error for the same issue till I landed here.
    – Wand Maker
    Commented Jan 30, 2023 at 11:44
  • 1
    How is this NOT the accepted answer?? I wasted 5 hours and a LOT of hair over this. Thanks a lot @Liu CZ
    – Vighnesh
    Commented Apr 5, 2023 at 16:08
  • Comparing to the other comments I was lucky and only wasted ~30 minutes. Still: Many thanks!
    – luona.dev
    Commented Feb 24 at 14:08
  • 1
    after i spent a whole morning enabling, disabling extensions, deleting and recreating projects, deleting reinstalling vscode, npm, node, bun, resetting vscode settings, checked infinite threads and whatever, i can now, confidently say i hate microsoft
    – aleee
    Commented Sep 29 at 12:57
6

I had been working on merging 7 React apps into Turborepo monorepos, and was troubled by the fact that tsconfig/.eslintrc could not reflect in real-time when I made changes to them, so I built this small extension to monitor those config files and restart TypeScript / ESLint servers accordingly.

Link to the VS Code extension:

https://marketplace.visualstudio.com/items?itemName=neotan.vscode-auto-restart-typescript-eslint-servers

vscode-auto-restart-typescript-eslint-servers

Restart TypeScript or ESLint server automatically if monitored configuration or files changed.

Banner

Features

  • Restart TypeScript and ESLint servers automatically
  • Enable/Disable files monitoring

Credits

0

Go to Settings on your VSCode (Botton left cog icon). Then search for tss and use the TypeScript tab as depicted on the screenshot. Then, look for the highlighted section as per screenshot.

Enabling Tsserver

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.