oraios/serena · error · FileNotFoundError

Haxe Language Server not found. Install options: 1. Instal

Error message

Haxe Language Server not found. Install options:
  1. Install the vshaxe VSCode extension: code --install-extension nadako.vshaxe
  2. Set ls_path in serena_config.yml under ls_specific_settings.haxe

What it means

FileNotFoundError raised by HaxeLanguageServer._get_or_install_core_dependency when Node.js is available but the Haxe Language Server could not be obtained: not found locally and the attempt to download it from Open VSX (_download_from_open_vsx) failed or returned nothing. It lists manual installation options.

Source

Thrown at src/solidlsp/language_servers/haxe_language_server.py:114

            haxe_ls_dir = os.path.join(self._ls_resources_dir, ls_dirname)
            server_js_path = os.path.join(haxe_ls_dir, "bin", "server.js")
            if os.path.exists(server_js_path):
                log.info(f"Found Haxe Language Server at {server_js_path}")
                return server_js_path

            if shutil.which("node") is None:
                raise FileNotFoundError(
                    "Haxe Language Server not found and Node.js is not installed (required to run it).\n"
                    "Install options:\n"
                    "  1. Install Node.js and re-run (auto-download will proceed)\n"
                    "  2. Install the vshaxe VSCode extension: code --install-extension nadako.vshaxe\n"
                    "  3. Set ls_path in serena_config.yml under ls_specific_settings.haxe"
                )

            downloaded_path = self._download_from_open_vsx(haxe_ls_dir, version)
            if downloaded_path:
                return downloaded_path

            raise FileNotFoundError(
                "Haxe Language Server not found. Install options:\n"
                "  1. Install the vshaxe VSCode extension: code --install-extension nadako.vshaxe\n"
                "  2. Set ls_path in serena_config.yml under ls_specific_settings.haxe"
            )

        @staticmethod
        def _find_vscode_extension_server() -> str | None:
            """Search for the Haxe language server in VSCode extension directories."""
            search_paths = [
                os.path.expanduser("~/.vscode/extensions/nadako.vshaxe-*/bin/server.js"),
                os.path.expanduser("~/.vscode-server/extensions/nadako.vshaxe-*/bin/server.js"),
                os.path.expanduser("~/.vscode-insiders/extensions/nadako.vshaxe-*/bin/server.js"),
            ]
            for pattern in search_paths:
                matches = sorted(glob.glob(pattern), reverse=True)  # newest version first
                for match in matches:
                    if os.path.isfile(match):

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Check network access to https://open-vsx.org (curl -I https://open-vsx.org) and retry; fix proxy settings if needed
  2. Install the vshaxe VSCode extension (`code --install-extension nadako.vshaxe`) and set ls_path to its language server binary
  3. Set ls_path in serena_config.yml under ls_specific_settings.haxe to a manually obtained Haxe LS build
  4. Pin/adjust the requested version to one that exists on Open VSX

Example fix

# before (serena_config.yml) — no fallback, relies on download
ls_specific_settings: {}
# after — point at a manually installed server
ls_specific_settings:
  haxe:
    ls_path: '/opt/tools/haxe-language-server/bin/server.js'
Defensive patterns

Strategy: fallback

Validate before calling

import urllib.request
def ensure_open_vsx_reachable():
    try:
        urllib.request.urlopen('https://open-vsx.org', timeout=5)
    except Exception as e:
        raise RuntimeError(f'Open VSX unreachable; pre-install vshaxe and set ls_path: {e}')

Try / catch

try:
    ls = HaxeLanguageServer(...)
except FileNotFoundError as e:
    if 'Install options' in str(e):
        log.error('Haxe LS download failed; install vshaxe extension or set ls_specific_settings.haxe.ls_path')
        raise

Prevention

When it happens

Trigger: Initializing the Haxe server when server.js is absent, node IS installed, but the Open VSX download fails — network error, the extension package is unavailable on open-vsx.org, a version has no published artifact, or the download's expected output path is missing.

Common situations: Offline or proxy-restricted environments blocking open-vsx.org; newly released/renamed Haxe LS version with no Open VSX artifact; transient network failure; corporate firewall with TLS interception.

Related errors


AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29). Data as JSON: /api/errors/e4d3e2de3f87f9eb. Report an issue: GitHub.