microsoft / TypeScript-Sublime-Plugin

IO wrapper around TypeScript language services, allowing for easy consumption by editor plugins
Apache License 2.0
1.72k stars 235 forks source link

plugin stop working #574

Closed abenhamdine closed 7 years ago

abenhamdine commented 7 years ago

ST build 3126 Windows 10 64 bits

The plugin was perfectly working these last days. Suddenly, today, without any obvious reason, the plugin stopped working : no completion, no typecheck, no build, etc...

Errors in the console view :

Path of tsserver.js: C:/Users/Arnaud Benhamdine/AppData/Roaming/npm\tsserver.js
Path of tsc.js: C:/Users/Arnaud Benhamdine/AppData/Roaming/npm\tsc.js
Trying to spawn node executable from: node
ref view not found
Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 389, in run_callback
    expr()
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 522, in <lambda>
    run_callback('on_activated', callback, lambda: callback.on_activated(v))
  File "C:\Users\Arnaud Benhamdine\AppData\Roaming\Sublime Text 3\Packages\TypeScript\typescript\listeners\listeners.py", line 25, in on_activated
    info = get_info(view)
  File "C:\Users\Arnaud Benhamdine\AppData\Roaming\Sublime Text 3\Packages\TypeScript\typescript\libs\view_helpers.py", line 61, in get_info
    open_file(view)
  File "C:\Users\Arnaud Benhamdine\AppData\Roaming\Sublime Text 3\Packages\TypeScript\typescript\libs\view_helpers.py", line 145, in open_file
    cli.service.open(view.file_name())
  File "C:\Users\Arnaud Benhamdine\AppData\Roaming\Sublime Text 3\Packages\TypeScript\typescript\libs\service_proxy.py", line 123, in open
    self.__comm.postCmd(json_str)
  File "C:\Users\Arnaud Benhamdine\AppData\Roaming\Sublime Text 3\Packages\TypeScript\typescript\libs\node_client.py", line 143, in postCmd
    self.server_proc.stdin.flush()
OSError: [Errno 22] Invalid argument

I saw this SO topic : http://stackoverflow.com/questions/40398932/typescript-for-sublime-text-suddenly-stopped-working but I'm not willing to replace some ts library files, as proposed in this topic, as I want to use latest stable ts 2.1.4, installed globally on my pc. And again, it worked perfectly these last days.

Visual Studio Code on the same machine, with the same project, runs normally.

abenhamdine commented 7 years ago

The pb was the incorrect path in setting "typescript_tsdk". However, it was difficult to detect because of the setting I added in Preferences>Packages>Typescript>Plugin settings - User was weirdly moved to Preferences>Settings 😲 I don't know if it's the expected behaviour of ST or this plugin, but it was quite strange...