Plugin suddenly cannot build typescript files or find names unless Sublime 3 is restarted
See original GitHub issuePlugin 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.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:57 (36 by maintainers)
Top Results From Across the Web
How to compile TypeScript and run the result .js file in one ...
I've already successfully installed TypeScript plugin on Sublime Text 3. After the plugin is installed, it has a build system added to the...
Read more >Ultimate Text Editing Productivity with Sublime Text | Ben Frain
Learn how to use Sublime Text like an expert! In this class you will learn all the incredible capabilities of Sublime Text and...
Read more >Version History - CodeKit
3.9.2 fixes issues where TypeScript files failed to compile and npm packages with names shorter than 4 characters didn't show up in search...
Read more >Modern IDEs are magic. Why are so many coders still using ...
I wish there was a modern vim. A minimal text editor with a scripting language and good plugins. but I don't want to...
Read more >https://raw.githubusercontent.com/Microsoft/TypeSc...
TypeScript Plugin for Sublime Text ... If the `node_path` setting is present, this will override the PATH environment variable and the plug-in will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
:Or, to your
sublime-keymap
file: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.
@DanielRosenwasser @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.
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.