question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add command to restart ts server

See original GitHub issue

This plugin has been working great for the most part, but sometimes it does strange things, such as not finding a file within typings/ that is clearly there.

Could you add a command (accessible via cmd + shift + p) that restarts the ts server? I think this would help mitigate this and many other issues that other devs experience.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:6
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
kylebebakcommented, Apr 30, 2019

There are many things that cause tsserver to fail (adding a module, changing the component in a module from a class component to a function component, etc).

Just have a look at the following:

Fortunately, this cool plugin, https://github.com/randy3k/AutomaticPackageReloader, has a command for reloading any Sublime Text plugin.

Install AutomaticPackageReloader and add something like the following to User/Default.sublime-commands:

{ "caption": "Reload TypeScript Package", "command": "package_reloader_reload", "args": {"pkg_name": "TypeScript"} },

Or, to your sublime-keymap file:

{ "keys": ["super+ctrl+alt+t"], "command": "package_reloader_reload", "args": {"pkg_name": "TypeScript"} },

This reloads the TypeScript package, and in most every case I’ve seen makes it actually start working again. This is a lot easier and faster than restarting Sublime Text.

0reactions
aMonikercommented, Oct 23, 2018

Any developments on this issue, or the potential fixes to the tsserver? This seems to happen to me sometimes when I leave TS files open and switch between git branches.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Where is VSCode's "Restart TS server"? - Stack Overflow
You'll need to have a .js , .ts or .tsx file focused in the editor. · Then Open the command palette. Mac: Cmd...
Read more >
Restart TS server Status Bar button - Visual Studio Marketplace
The Restart TS server button on your Status Bar you didn't know you need. ... Launch VS Code Quick Open ( Ctrl+P ),...
Read more >
How to Restart the TypeScript NodeJS Application Fast
Don't trust the Server Start time here, it actually took more than 20 ... ts-node. I tried to restart the application using tsc...
Read more >
Make ts-server monitor file/folder and immediately restart?
Speaking vscode-only, there's "Restart TS server" in command palette which does exactly what it stands for. Personally I don't know about ...
Read more >
TypeScript — Use Nodemon to Restart Your Server on Changes
Restart Your Server When Changing Your TypeScript Code. First, add nodemon and ts-node as devDependencies to your project.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found