sublimelsp / lsp_utils

Module with LSP-related utilities for Sublime Text
https://sublimelsp.github.io/lsp_utils/
MIT License
13 stars 6 forks source link

fix: add node directory to PATH correctly on Windows #111

Closed rchl closed 11 months ago

rchl commented 11 months ago

We've added wrong node directory path to PATH on Windows thus scripts weren't able to find node during npm install.

Resolves https://github.com/sublimelsp/LSP-intelephense/issues/93

predragnikolic commented 11 months ago

CASE #1 Test Windows when I do not have a global node version installed

Cannot reproduce the issue in this case. lsp_utils can find the local node version, even without this PR. (as long as the user pressed "Download Node.js", in the popup that says "Could not start LSP-* due to not being able to find Node.js runtime on the PATH", and downloaded the new Node18 version)

CASE #2 Test Windows when I do have a global node version installed

I haven't tested this case.

rchl commented 11 months ago

I've reproduced this issue in UTM so you don't really have to but if you want then make sure that:

predragnikolic commented 11 months ago

Thanks, following those steps I will get an error when the server is installed for the first time. And this PR fixes that.


I don't seem to reproduce this issue with other LSP node based servers on windows? Did you?

rchl commented 11 months ago

It appears to be specific to postinstall script of some of the package so yeah, it wouldn't reproduce for every server.