sublimelsp / LSP

Client implementation of the Language Server Protocol for Sublime Text
https://lsp.sublimetext.io/
MIT License
1.61k stars 182 forks source link

Package is not installable #2474

Closed fenollp closed 3 weeks ago

fenollp commented 3 weeks ago

Describe the bug

Recently, my installed LSP package disappeared. Today, installing it though the command pallette is impossible: LSP doesn't shows up in the results of the query lsp.

Reinstalling other LSP packages e.g. Rust's seems to work, until it fails on the missing dependent LSP base package:

reloading plugin LSP-rust-analyzer.plugin_commands
Traceback (most recent call last):
  File "/opt/sublime_text/Lib/python38/sublime_plugin.py", line 325, in reload_plugin
    m = importlib.import_module(modulename)
  File "./python3.8/importlib/__init__.py", line 127, in import_module
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 868, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/pete/.config/sublime-text/Installed Packages/LSP-rust-analyzer.sublime-package/plugin_commands.py", line 1, in <module>
  File "/home/pete/.config/sublime-text/Installed Packages/LSP-rust-analyzer.sublime-package/plugin.py", line 1, in <module>
ModuleNotFoundError: No module named 'LSP'

To Reproduce

Steps to reproduce the behavior:

  1. Look for lsp in the command palette (Install package...)
  2. Scroll for ages because so many packages match just 3 letters
  3. Don't find the LSP package

Expected behavior

I'd expect either of these:

Environment (please complete the following information):

jfcherng commented 3 weeks ago
LSP version: _

This missing information is crutial actually.


reloading plugin LSP-rust-analyzer.plugin_commands ModuleNotFoundError: No module named 'LSP'

That looks like your LSP is still running on py33.

rchl commented 3 weeks ago

LSP package might have gotten ignored on updating. Check if it's in ignored_packages in ST Preferences and remove if so.

fenollp commented 3 weeks ago

This missing information is crutial actually.

Well, I'm sure you see the Catch-22 here ;)


Thanks for putting me in the right direction! It seems indeed related to the move to py38, which is mentioned in the release notes. However upgrade somehow failed so I could not read these release notes...

Anyway, now I have a direction to dig through! Thanks :)

NOTE: Is there a dependency on node? Also, this mentions windows.py? I'm on Linux and never use node nor want to.

plugins loaded
Package Control: Removed orphaned library "sublime_lib" for Python 3.3
Package Control: Removed orphaned library "lsp_utils" for Python 3.3
Package Control: All specified packages up-to-date!
reloading /home/pete/wefwefwef/rustcbuildx.git/src/cli.rs
...SNIP...
Unable to open /home/pete/wefwefwef/rustcbuildx.git/src/extensions.rs
reloading /home/pete/wefwefwef/rustcbuildx.git/src/runner.rs
...SNIP...
--- lsp_utils Node.js resolving start ---
Resolving Node.js Runtime in env PATH for package LSP-bash...
 * Failed: "node" binary not found
Resolving Node.js Runtime from lsp_utils for package LSP-bash...
 * Binaries check failed: "node" binary not found
 * Download skipped
--- lsp_utils Node.js resolving end ---
Unable to start subprocess for LSP-bash
Traceback (most recent call last):
  File "/home/pete/.config/sublime-text/Installed Packages/LSP.sublime-package/plugin/core/windows.py", line 256, in start_async
    if plugin_class.needs_update_or_installation():
  File "/home/pete/.config/sublime-text/Lib/python38/lsp_utils/_client_handler/abstract_plugin.py", line 101, in needs_update_or_installation
    server = cls.get_server()
  File "/home/pete/.config/sublime-text/Lib/python38/lsp_utils/npm_client_handler.py", line 122, in get_server
    cls.__server = ServerNpmResource.create({
  File "/home/pete/.config/sublime-text/Lib/python38/lsp_utils/server_npm_resource.py", line 47, in create
    node_runtime = NodeRuntime.get(package_name, storage_path, required_node_version)
  File "/home/pete/.config/sublime-text/Lib/python38/lsp_utils/node_runtime.py", line 59, in get
    cls._node_runtime = cls._resolve_node_runtime(package_name, storage_path, required_semantic_version)
  File "/home/pete/.config/sublime-text/Lib/python38/lsp_utils/node_runtime.py", line 129, in _resolve_node_runtime
    raise Exception('Failed resolving Node.js Runtime. Please check in the console for more details.')
Exception: Failed resolving Node.js Runtime. Please check in the console for more details.

Does this require node/npm? README doesn't mention that

jfcherng commented 3 weeks ago

Does this require node/npm? README doesn't mention that

LSP-bash required node.js indeed. Either you have a compatible system installation, or an installation managed by lsp_utils, which I guess has been rejected by you (Download skipped).

fenollp commented 3 weeks ago

enabled/disabled some packages, reinstalled lsp and lsp-ra and all good! Thanks!