oraios/serena · error · FileNotFoundError

Haxe Language Server not found and Node.js is not installed

Error message

Haxe Language Server not found and Node.js is not installed (required to run it).
Install options:
  1. Install Node.js and re-run (auto-download will proceed)
  2. Install the vshaxe VSCode extension: code --install-extension nadako.vshaxe
  3. 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 the Haxe Language Server's server.js is not present in the resources directory AND Node.js (required to execute it) is not installed. The library would otherwise auto-download the server, but it refuses to proceed when there is no runtime to run it with.

Source

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

                log.info(f"Found system-installed haxe-language-server at {system_haxe_ls}")
                return system_haxe_ls

            # 2. Check VSCode extension locations
            vscode_server_path = self._find_vscode_extension_server()
            if vscode_server_path:
                log.info(f"Found Haxe Language Server in VSCode extension at {vscode_server_path}")
                return vscode_server_path

            # 3. Check resource dir / download from Open VSX
            version = self._custom_settings.get("version", DEFAULT_VSHAXE_VERSION)
            ls_dirname = "haxe-lsp" if version == INITIAL_VSHAXE_VERSION else f"haxe-lsp-{version}"
            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"
            )

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Install Node.js (e.g. from nodejs.org or your package manager) and verify `node --version`, then re-run — auto-download will proceed
  2. If Node exists via nvm, make it available on PATH for the process (activate the nvm version)
  3. Install the vshaxe VSCode extension (`code --install-extension nadako.vshaxe`) and point ls_path at its language server
  4. Set ls_path in serena_config.yml under ls_specific_settings.haxe to an existing server entry point

Example fix

// before
node --version  # command not found
// after
# Debian/Ubuntu
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version  # re-run server; auto-download proceeds
Defensive patterns

Strategy: validation

Validate before calling

import os, shutil
def ensure_haxe_prereqs(resources_dir: str, ls_dirname: str):
    server_js = os.path.join(resources_dir, ls_dirname, 'bin', 'server.js')
    have_server = os.path.isfile(server_js)
    have_node = shutil.which('node') is not None
    if not have_server and not have_node:
        raise FileNotFoundError('Install Node.js so the Haxe LS can be downloaded and run')

Prevention

When it happens

Trigger: Initializing the Haxe language server when the auto-downloaded haxe-ls resources dir (bin/server.js) is missing and shutil.which('node') returns None, and no ls_path override is configured.

Common situations: First run on a machine without Node.js; Node installed via nvm but not on PATH for the running process; Docker/CI image lacking Node; previous auto-download failed leaving no server.js.

Related errors


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