-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Node.js issues after installing through LSP-copilot #100
Comments
|
Sure, here it comes:
Does this help? |
What's the directory structure within |
Here it is: |
Are you able to manually start |
That path is invalid, 16.15.0 is between
I can also start it from |
Kinda running out of ideas. :) Maybe you can add some logging to diff --git a/st3/lsp_utils/node_runtime.py b/st3/lsp_utils/node_runtime.py
index 841df0c..ff876d3 100755
--- a/st3/lsp_utils/node_runtime.py
+++ b/st3/lsp_utils/node_runtime.py
@@ -229,6 +229,10 @@ class NodeRuntimeLocal(NodeRuntime):
self._additional_paths = [path.join(self._node_dir, 'bin')]
self._install_in_progress_marker_file = path.join(self._base_dir, '.installing')
self._resolve_paths()
+ print('PATHS')
+ print(self._base_dir)
+ print(self._node)
+ print(self._npm)
# --- NodeRuntime overrides ---------------------------------------------------------------------------------------- |
I've started with none :D These seem to be right (at least to me):
The rest, not so much:
But this error message is a bit different than the previous one. What does this |
It appears that running I remember there was someone with an issue like that on Windows where he modified some registry value so that all "shell" invocations were wrapped into another script that was failing. It seems like a similar issue. |
Found it on Discord:
|
I will try to address it in #101 anyway, even if it appears to be an Windows configuration issue or some third-party software causing issues. |
I cannot reproduce on Windows 11 in my VM. I tried a couple of things. Still nothing. |
Is there a way to check if this is the reason in my case? I don't remember tinkering with the registry. I've tried to find the part where this goes awry, and located
right after it just to see what line 163 puts into those two variables and it was very interesting. I'm pretty sure that what it printed
is kinda unexpected by the code trying to interpret values in |
The code is correct. Your Windows is doing something that is not correct. As I've quoted in #100 (comment), some third party apps can influence the exit code of the command and turn a successful response into an error response even though the app itself ( I think my linked change should fix it because we won't execute it in "shell" mode anymore and I think this issue only affects shell mode. We'll have to see once I merge my fix. |
I've merged my fix. In an hour or more the update should be available and it will be possible to manually trigger it with |
I haven't said it is not. I merely stated that something strange happens, which might very well be the result of Windows doing something bad. I highly doubt that swapping two variables could hide in shadows for any length of time, provided that the Also, my bad, it's not two spaces, but an empty string (which should evaluate to False but is definitely not None). |
I'm only doing this change because it should make things slightly more efficient on Windows. The fixing of this issue (hopefully) will be just a positive side effect. |
And here I was thinking you wanted to help me 😛 Nevertheless, this indeed made the problem go away, so thank you very much, @rchl. |
I don't like doing workarounds for seemingly broken configurations :) You should figure out your issue anyway as it might affect other things (even within ST). It looks like non-interactive shell invocations return exit code for some reason even though the executable returns a successful response. |
I've tried to follow the simple installation guide for LSP-copilot and the problems started at step one. Installing LSP was done successfully, but after installing LSP-copilot I faced a warning stating that:
Obviously, I chose "Download Node.js" which downloaded something and put it into "C:\Users\gemis\AppData\Local\Sublime Text\Package Storage\lsp_utils". Before I could restart Sublime Text, it popped an error dialog with this:
Trying the suggested "LSP: Enable Language Server In Project" will only resurrect the error dialog. I guess something with path is not set properly but I have no idea what. Any hints?
The text was updated successfully, but these errors were encountered: