sublime-import-cost
sublime-import-cost copied to clipboard
Can't find node on windows
Using ST3 on Windows, I'm getting Error: Couldn't find "node" in "/usr/local/bin/node".
I already changed "node_path": "node.exe", in both Packages\Import Cost\import-cost.sublime-settings and Packages\User\import-cost.sublime-settings.
Even if the setting wouldn't work (does for other plugins), I would have expected to see a different error message than the one I get.
Is the value maybe still hardcoded somewhere?
Sorry for the late response. Hm, there shouldn't be anything hardcoded, maybe its not reading the settings file correctly 🤔 Does it give any additional error message in the "console"?
Could you try to change the error messages in https://github.com/julianburr/sublime-import-cost/blob/master/import-cost.py#L123 and https://github.com/julianburr/sublime-import-cost/blob/master/import-cost.py#L136 to be different to see where it actually errors out? Sorry, don't have a windows machine on hand to test it myself atm.
Hi. No worries about the delay, this is somewhat a luxury feature anyways :) I'll check after my vacation, so it'll take even longer :)
The same issue. I've changed "node_path" to the right one, but it trying to look it in the default path.
Console output:
Error: Couldn't find "node" in "/usr/local/bin/node" Traceback (most recent call last): File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 514, in on_load attach_view(v) File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 365, in attach_view check_view_event_listeners(view) File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 359, in check_view_event_listeners listeners.append(cls(view)) File "C:\Users\Username\AppData\Roaming\Sublime Text 3\Packages\Import Cost\import-cost.py", line 26, in init self.update_phantoms() File "C:\Users\Username\AppData\Roaming\Sublime Text 3\Packages\Import Cost\import-cost.py", line 39, in update_phantoms self.calc_imports(imports) File "C:\Users\Username\AppData\Roaming\Sublime Text 3\Packages\Import Cost\import-cost.py", line 77, in calc_imports json_data = json.loads(data) File "./python3.3/json/init.py", line 316, in loads File "./python3.3/json/decoder.py", line 351, in decode TypeError: expected string or buffer