Closed Fulguritude closed 2 years ago
I'd really like to fix this. Where in the TypeScript-Sublime-Plugin repo can I find the source code where the node executable read ? I'm thinking it might be looking for a node.exe
or something, rather than plain node
, and I want to see if I can fix it and make a pull request.
So I have some progress, running grep -rnw '.' -e 'Configured node path'
, I found that the only file in the repo with that specific string was ./typescript/libs/node_client.py
. This string is returned when os.path.isfile(fpath) and os.access(fpath, os.X_OK)
returns false. Now, I have no idea why this returns false. I tried the exact same logic (with the appropriate filepath) via my terminal's python3 interpreter, and it returned true...
I tried removing the is_executable check as well (and just force node_path = configured_node_path
); but it didn't work either. I'm know I'm on the right file, because I added some print statements and these were read.
Permissions on this instance of node
are 755, with root
as the owner. Could this error be due to the version of Python (or its permissions) that the plugin uses to run the node_client.py config ? I'll try experimenting some more.
Just tried print("PWD: " + os.getcwd())
from node_client.py
, it returned PWD: /app/extra/sublime_text
. None of these directories (app, extra, sublime_text) exist, so I suppose Sublime Text is using some sort of chroot-jail-like virtual environment to run. Not surprising then that it can't find node on its path, given that it has a whole different root... Does anyone know where this virtual env is supposed to be created so I can try to put a symlink to node inside it ? Or have a better way of adding node to this virtual environment ? I tried adding the Nodejs sublime package to no avail
After further research, this seems to in fact be an issue with Sublime Text itself. I have posted the following message on their forums: https://forum.sublimetext.com/t/bug-sublime-text-cant-find-nodejs-on-pop-os-ubuntu-20-04/55553
There is no underlinign of errors, autocompletion, etc, on Pop! OS (an Ubuntu-based distro).
Here is the relevant output from my Sublime Text 3 console:
Notice:
I set my node_path in my settings, and the node_path seems to be recognized (this is indeed where node is on my machine); but for some reason ST3 cannot execute node or recognize it...