You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Reacted by Ali A. Saleem, Chris, Stefan Dragnev, Gregory, Thodoris Greasidis and Devansh Jethmalani
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.
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).
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.
Reacted by Gilbert and Thodoris Greasidis
Reacted by Nwabueze Miracle, Thodoris Greasidis and Illia Furman
Activity
speedy250 commentedon Apr 5, 2017
The tsserver simply needs to be fixed. See #585
zhengbli commentedon Apr 11, 2017
Can you try the local fix I created at the comment, which fixes a bug in the project system. Let me know if that fixes your issue
jmolero commentedon Jun 19, 2017
How about running tsserver with something like nodemon?
aMoniker commentedon 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.
kylebebak commentedon Apr 26, 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-keymapfile: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.