Closed rchl closed 3 years ago
I tested this on windows.
Make sure you have LSP-pyright installed or any other LSP-* plugin that user lsp_utils and set the following setting:
// Settings in here override those in "lsp_utils/lsp_utils.sublime-settings"
{
"nodejs_runtime": ["local"],
}
Close ST.
remove C:\Users\Predrag\AppData\Local\Sublime Text\Package Storage\lsp_utils
Open ST, and open a *.py
file and say yes to Install Node
locally.
Wait that the node installation starts.
Quit ST immediately after that. (so that the node installation is not finished)
Open ST. I get a popup to install Install Node
locally. I confirm the modal
and expect the Node installation to start again,
but I see an error in the status bar LSP-pyright: Error: Failed installing a local Node.js runtime:
I close ST and open it again, there is no error now and the node installation starts again.
The 7 step look suspicions, what is the expected behavior for step 7?
What's the next log line after LSP-pyright: Error: Failed installing a local Node.js runtime:
?
I've tried that on mac and it seems to work fine here.
What's the next log line after LSP-pyright: Error: Failed installing a local Node.js runtime:?
It's File is not a zip file
.
Package Control: Installing 1 missing package
[lsp_utils] Installing Node.js 12.20.2
LSP-pyright: Error: Failed installing a local Node.js runtime:
File is not a zip file
reloading settings Packages/User/Package Control.sublime-settings
reloading settings Packages/User/Preferences.sublime-settings
I also get this text printed in the ST status bar LSP-pyright: Error installing server dependencies
at the same time I get LSP-pyright: Error: Failed installing a local Node.js runtime:
(but I am not sure if which error throws first)
Are you able to debug it a bit? Removing those lines: https://github.com/sublimelsp/lsp_utils/blob/0977b81198e5d7388b51ab197731347052f29403/st3/lsp_utils/node_runtime.py#L252-L253 should ensure that the "not a zip file" is not removed so that you can inspect it manually.
I'm not able to reproduce on Windows and @predragnikolic will be away for a while so I'll just go ahead with it.
Before the server installation we'll create a marker file that will only be removed on successful installation. So if the installation is interrupted by closing ST or otherwise we'll not end up with a broken installation that will then require re-installing the plugin.