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
{{ message }}
Repository navigation
Plugin suddenly cannot build typescript files or find names unless Sublime 3 is restarted #585
Plugin works fine for a period of time, but after working for a while and changing/saving files, I notice all of the sudden some of my class names and other namespaces cannot be found. I can't navigate to them with F12 (GoTo) and when I try to build a file, the compiler comes back with errors saying "Cannot find name InsertSomeNameHere"
There appears to be no errors in the console once this happens. The only way to fix the issues is to shut down SublimeText and reopen it. After reopening Sublime, everything works as expecting and I can build all files that were open and also GoTo any name as normal. Some random time later, this happens again and I have to shutdown and restart the editor again.
Reacted by Ali A. Saleem, Chris, Stefan Dragnev, Robert Laverty, Sean Hudson, Maciej Goszczycki and Thodoris Greasidis
changed the title [-]Plugin suddenly cannot compile or find names unless Sublime 3 is restarted[/-][+]Plugin suddenly cannot build typescript files or find names unless Sublime 3 is restarted[/+]on Feb 9, 2017
I have had the same issue for the past 3 weeks as well, having to restart sublime 3 because the path resolving will not update, and keep displaying an import as not existing. Seemingly crashed, until restart.
In some cases it even seems to stop working all together, showing no errors, when there are.
Same issue here. May I suggest a command to restart the compiler service so I don't have to close then open the sublime window (It has also been suggested in #584).
Martijn (@mxchange)Ali A. Saleem (@alexcorvi) Are either one of you using Vintageous? I'm curious if this plugin has anything to do with Typescript messing up... Seems like it wouldn't have any bearing on the situation, but I can't figure out what is happening.
This happens to me frequently as well. I'm temporarily using VSCode until its resolved (though I prefer Sublime).
For maintainers, as mentioned in a few other issues on here, I too wasn't able to get logs to generate - but I can say that by monitoring ps aux | grep typescript that when things went south, there was at least 2+ tsservers running under sublime. Restarting sublime reduced that count back to exactly one.
I'd settled for a quick tsserver restart from within sublime, but ideally fixed properly. Happy to debug, but need instructions on how to correctly activate the generation of the log files
Can confirm this is still an issue. In the course of today I've had Sublime crash like 12 times. Any word on a fix Zhengbo Li (@zhengbli) ? Chris (@cjke) did you get any success in fixing this problem?
In trying to fix this, I deleted the Sublime 3 folder from RoamingData (like creating a fresh install) and reinstalled all packages, but this did not fix so don't waste your time.
Running on Windows 10, Sublime build 3126, Node 7.8.0 through NVM 1.1.3
I still see this happening, also looks like there is no active development on this repo. I started writing more typescript and this is becoming a pain point. Thanks for the plugin and please fix this ASAP.
1-9 Maybe there is a version of the plugin that works properly we can find?
This has been such a great plugin up to now, and I don't want to switch to VSCode. It is now crashing at least 1-2 times per hour, sometimes more frequently.
Is there anyone NOT experiencing? Hit me up! I want to compare settings to diagnose more.
@shudson250 I agree this is really frustrating, I want to look into the plugin code see what could be causing this behavior. Which version of Node are you using? Do you use any version managers (nvm, n, etc..)? I notice this is happening when I open a second typescript file. I read some where it is creating a new typescript thread/instance not sure if this is the issue.
Zhengbo Li (@zhengbli), thanks for chiming in I am running NVM and on node v 7.8.0 (Mac OS 10.12 Seirra)
Problem - randomly I see a squiggly lines under my imports and modules and sublime can't do jump to definition etc.. Its kind of like the plugin has lost context of some modules. This happens only on custom name spaced modules and the imports from the file with actual path work fine.
I will add a screenshot once I have it
I tried random things
-- reinstalling the plugin
-- move away from NVM and go to a single version of node
The only way I was able to fix this is by restarting sublime.
Thanks for the info. I assume you are using the TS version that came with the plugin? Can you share your tsconfig.json file? Previously I heard about a similar issue caused by the tsconfig.json including too many source files accidentally.
That would be bad as your once-opened project would be hanging around forever. I tested on a mac, but still couldn't figure out where does the "unknown" command come from. And I think that is where the problem is.
On close of Sublime will the typescript server stop? Then the project will be closed too I assume. But yes the project will be hanging until you close sublime.
Once I close the last file in a project removeProject() is called but when I navigate to the existing project file from previously opened tab tsserver is not recreating the project
Traceback (most recent call last):
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 389, in run_callback
expr()
File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 458, in <lambda>
run_callback('on_pre_save', callback, lambda: callback.on_pre_save(v))
File "trailing_spaces in /Users/tapwater/Library/Application Support/Sublime Text 3/Installed Packages/TrailingSpaces.sublime-package", line 424, in on_pre_save
File "trailing_spaces in /Users/tapwater/Library/Application Support/Sublime Text 3/Installed Packages/TrailingSpaces.sublime-package", line 440, in freeze_last_version
File "./python3.3/codecs.py", line 896, in open
FileNotFoundError: [Errno 2] No such file or directory: '/Users/tapwater/p/app-app/client/public/style.css'
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 in a second or two. This is a lot easier and faster than restarting Sublime Text.
Daniel Rosenwasser (@DanielRosenwasser)Zhengbo Li (@zhengbli)
It might be good to add this solution to the documentation. If this issue is any indication the plugin crashes frequently (it certainly does in my experience) and it seems like there's no one able to fix the crash issues.
I'd be glad to add this to the docs and submit a PR if people think it's worth it.
Reacted by Toby Fox, Rae Liu, Anthony BARRE, Volkan Unsal and Thodoris Greasidis
Kyle Bebak (@kylebebak) your suggestion is a godsend. The number of times I've had to restart Sublime Text until now... This plugin works perfectly for me.
Activity
[-]Plugin suddenly cannot compile or find names unless Sublime 3 is restarted[/-][+]Plugin suddenly cannot build typescript files or find names unless Sublime 3 is restarted[/+]mxchange commentedon Feb 10, 2017
I have had the same issue for the past 3 weeks as well, having to restart sublime 3 because the path resolving will not update, and keep displaying an import as not existing. Seemingly crashed, until restart.
In some cases it even seems to stop working all together, showing no errors, when there are.
alexcorvi commentedon Feb 10, 2017
Same issue here. May I suggest a command to restart the compiler service so I don't have to close then open the sublime window (It has also been suggested in #584).
deanproxy commentedon Feb 13, 2017
Martijn (@mxchange) Ali A. Saleem (@alexcorvi) Are either one of you using Vintageous? I'm curious if this plugin has anything to do with Typescript messing up... Seems like it wouldn't have any bearing on the situation, but I can't figure out what is happening.
alexcorvi commentedon Feb 13, 2017
I'm not using Vintageous.
This issue occurs more frequently on large projects when I choose to
show the errors listfrom the command platelet.deanproxy commentedon Feb 13, 2017
okay. that rules out that theory then...
It happens to me and I'm not using the
show the errors listoption when it happens. It's usually after I save a file within my project.cjke commentedon Feb 15, 2017
This happens to me frequently as well. I'm temporarily using VSCode until its resolved (though I prefer Sublime).
For maintainers, as mentioned in a few other issues on here, I too wasn't able to get logs to generate - but I can say that by monitoring
ps aux | grep typescriptthat when things went south, there was at least 2+ tsservers running under sublime. Restarting sublime reduced that count back to exactly one.I'd settled for a quick tsserver restart from within sublime, but ideally fixed properly. Happy to debug, but need instructions on how to correctly activate the generation of the log files
it6 commentedon Feb 17, 2017
I experienced similar issues, but once I moved away from NVM and N and installed a single version of node this issue went away.
Update 3/1/17
It's actually node version 4 that fixed this issue. Not sure if NVM or N has any role to play.
speedy250 commentedon Apr 4, 2017
Can confirm this is still an issue. In the course of today I've had Sublime crash like 12 times. Any word on a fix Zhengbo Li (@zhengbli) ?
Chris (@cjke) did you get any success in fixing this problem?
In trying to fix this, I deleted the Sublime 3 folder from RoamingData (like creating a fresh install) and reinstalled all packages, but this did not fix so don't waste your time.
Running on Windows 10, Sublime build 3126, Node 7.8.0 through NVM 1.1.3
it6 commentedon Apr 5, 2017
I still see this happening, also looks like there is no active development on this repo. I started writing more typescript and this is becoming a pain point. Thanks for the plugin and please fix this ASAP.
speedy250 commentedon Apr 5, 2017
1-9 Maybe there is a version of the plugin that works properly we can find?
This has been such a great plugin up to now, and I don't want to switch to VSCode. It is now crashing at least 1-2 times per hour, sometimes more frequently.
Is there anyone NOT experiencing? Hit me up! I want to compare settings to diagnose more.
it6 commentedon Apr 5, 2017
@shudson250 I agree this is really frustrating, I want to look into the plugin code see what could be causing this behavior. Which version of Node are you using? Do you use any version managers (nvm, n, etc..)? I notice this is happening when I open a second typescript file. I read some where it is creating a new typescript thread/instance not sure if this is the issue.
zhengbli commentedon Apr 5, 2017
@shudson250 1-9 can you provide a minimal repro code sample where this issue happens?
What TypeScript version / node version are you using?
it6 commentedon Apr 5, 2017
Zhengbo Li (@zhengbli), thanks for chiming in I am running NVM and on node v 7.8.0 (Mac OS 10.12 Seirra)
Problem - randomly I see a squiggly lines under my imports and modules and sublime can't do jump to definition etc.. Its kind of like the plugin has lost context of some modules. This happens only on custom name spaced modules and the imports from the file with actual path work fine.
I will add a screenshot once I have it
I tried random things
-- reinstalling the plugin
-- move away from NVM and go to a single version of node
The only way I was able to fix this is by restarting sublime.
Appreciate your help in advance, thanks.
zhengbli commentedon Apr 5, 2017
Thanks for the info. I assume you are using the TS version that came with the plugin? Can you share your
tsconfig.jsonfile? Previously I heard about a similar issue caused by the tsconfig.json including too many source files accidentally.30 remaining items
zhengbli commentedon Apr 8, 2017
Updated now, if anyone can try again
it6 commentedon Apr 8, 2017
Zhengbo Li (@zhengbli) - oooohhhhhh finally, I was able to fix it by editing
tsserver.jsinSublime Text 3/Packages/TypeScript/tsserverremove/comment the line
this.removeProject(project);, which is making the plugin crashIs there a way to set
projectsToRemoveto false sothis.removeProject(project)will not be called.zhengbli commentedon Apr 10, 2017
That would be bad as your once-opened project would be hanging around forever. I tested on a mac, but still couldn't figure out where does the "unknown" command come from. And I think that is where the problem is.
it6 commentedon Apr 11, 2017
On close of Sublime will the typescript server stop? Then the project will be closed too I assume. But yes the project will be hanging until you close sublime.
Once I close the last file in a project
removeProject()is called but when I navigate to the existing project file from previously opened tab tsserver is not recreating the projectgilbert commentedon May 31, 2017
Zhengbo Li (@zhengbli) I installed the files in
local4.zipand things seem to be working well so far.gilbert commentedon Jun 5, 2017
Well, maybe not. Here's another crash report:
zhengbli commentedon Jun 5, 2017
Gilbert (@gilbert) this looks like the plugin is conflicting with the "TrailingSpace" plugin that you installed though
gilbert commentedon Jun 5, 2017
Oh no, sorry about that. TypeScript plugin stopped working again, so I copied the first error I found. I will read before copy/pasting next time 😅
jmolero commentedon Aug 22, 2017
I could get some logs for this issue while using local4.zip fix.
log19086.txt
tsconfig.json.txt
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).
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 in a second or two. This is a lot easier and faster than restarting Sublime Text.
Daniel Rosenwasser (@DanielRosenwasser) Zhengbo Li (@zhengbli)
It might be good to add this solution to the documentation. If this issue is any indication the plugin crashes frequently (it certainly does in my experience) and it seems like there's no one able to fix the crash issues.
I'd be glad to add this to the docs and submit a PR if people think it's worth it.
tobek commentedon Jun 14, 2019
Kyle Bebak (@kylebebak) your suggestion is a godsend. The number of times I've had to restart Sublime Text until now... This plugin works perfectly for me.
kylebebak commentedon Jun 14, 2019
Glad it helped! And thanks Randy Lai (@randy3k) =)
raejin commentedon Oct 17, 2019
Kyle Bebak (@kylebebak) Thank you so much for this workaround, I can now finally stop restarting sublime.