oraios/serena · error · FileNotFoundError

The 'deno' executable was not found on PATH. Install Deno (h

Error message

The 'deno' executable was not found on PATH. Install Deno (https://docs.deno.com/runtime/getting_started/installation/) — it bundles the language server used here — and ensure 'deno' is on your PATH.

What it means

This FileNotFoundError is raised when the Deno language server dependency provider cannot find a 'deno' executable on PATH. Unlike other servers, Deno's LSP is not downloaded separately — it ships inside the deno runtime — so the runtime itself must be installed and discoverable.

Source

Thrown at src/solidlsp/language_servers/deno_language_server.py:59

            "typescript",
            solidlsp_settings,
        )

    def _create_dependency_provider(self) -> LanguageServerDependencyProvider:
        return self.DependencyProvider(self._custom_settings, self._ls_resources_dir)

    @override
    def is_ignored_dirname(self, dirname: str) -> bool:
        # node_modules appears in Deno projects using npm compatibility; vendor/ holds
        # vendored remote dependencies. Neither should be indexed as project sources.
        return super().is_ignored_dirname(dirname) or dirname in ["node_modules", "vendor", "dist", "build"]

    class DependencyProvider(LanguageServerDependencyProviderSinglePath):
        def _get_or_install_core_dependency(self) -> str:
            """Return the path to the ``deno`` executable (the language server ships with it)."""
            deno_path = shutil.which("deno")
            if deno_path is None:
                raise FileNotFoundError(
                    "The 'deno' executable was not found on PATH. Install Deno "
                    "(https://docs.deno.com/runtime/getting_started/installation/) — it bundles "
                    "the language server used here — and ensure 'deno' is on your PATH."
                )
            return deno_path

        def _create_launch_command(self, core_path: str) -> list[str]:
            return [core_path, "lsp"]

    def _get_language_id_for_file(self, relative_file_path: str) -> str:
        # deno lsp relies on the correct languageId; .tsx/.jsx in particular must not
        # be sent as plain "typescript" or symbol ranges get truncated at JSX expressions.
        if relative_file_path.endswith(".tsx"):
            return "typescriptreact"
        if relative_file_path.endswith(".jsx"):
            return "javascriptreact"
        if relative_file_path.endswith((".js", ".mjs", ".cjs")):
            return "javascript"

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Install Deno following https://docs.deno.com/runtime/getting_started/installation/ (curl/iwr installer, brew, scoop, etc.).
  2. Verify with 'which deno' and 'deno --version' in the same shell/environment that runs Serena.
  3. If using a version manager, ensure its shims directory is on PATH for the process launching Serena.
  4. Restart the IDE/terminal after installation so PATH changes propagate.
  5. As a workaround, symlink the deno binary into a directory already on PATH (e.g. /usr/local/bin).

Example fix

// before
$ which deno
(none)
// after
$ curl -fsSL https://deno.land/install.sh | sh
$ export PATH="$HOME/.deno/bin:$PATH"
$ which deno
Defensive patterns

Strategy: validation

Validate before calling

import shutil, sys
if shutil.which('deno') is None:
    sys.exit("Deno is required: https://docs.deno.com/runtime/getting_started/installation/")

Try / catch

try:
    ls = SolidLSP(deno_config)
    ls.start()
except FileNotFoundError as e:
    if "'deno'" in str(e):
        raise SystemExit('Install Deno and ensure it is on PATH of the process running Serena.')
    raise

Prevention

When it happens

Trigger: Instantiating/starting the Deno language server when shutil.which('deno') returns None, i.e. deno is not installed or not on the PATH of the process running Serena.

Common situations: Deno never installed; installed via a version manager (mise/asdf/volta) whose shims aren't on PATH in the current shell/IDE; deno installed only in a venv/container differing from the one running Serena; PATH stripped in GUI-launched or systemd contexts.

Related errors


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