oraios/serena · error · FileNotFoundError

{LS_BIN_NAME} executable not found at {executable_path}; npm

Error message

{LS_BIN_NAME} executable not found at {executable_path}; npm install of some-sass-language-server@{package_version} did not produce the expected binary.

What it means

After npm-installing some-sass-language-server, _get_or_install_core_dependency checks that the expected binary (LS_BIN_NAME) exists at executable_path. If the npm install completed but did not yield the binary, this FileNotFoundError is raised — the install silently produced nothing usable (e.g. wrong package version, bin name change, or failed postinstall).

Source

Thrown at src/solidlsp/language_servers/some_sass_language_server.py:149

                executable_path += ".cmd"

            if not os.path.exists(executable_path):
                expected_version = f"some-sass-language-server@{package_version}"
                log.info("Installing %s...", expected_version)
                deps = RuntimeDependencyCollection(
                    [
                        RuntimeDependency(
                            id="some-sass-language-server",
                            description="Some Sass language server (SCSS / Sass / CSS)",
                            command=build_npm_install_command("some-sass-language-server", package_version, npm_registry),
                            platform_id="any",
                        ),
                    ]
                )
                deps.install(install_dir)

            if not os.path.exists(executable_path):
                raise FileNotFoundError(
                    f"{LS_BIN_NAME} executable not found at {executable_path}; "
                    f"npm install of some-sass-language-server@{package_version} did not produce the expected binary."
                )
            return executable_path

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

    def _create_base_initialize_params(self) -> dict:
        initialize_params: dict = {
            "locale": "en",
            "capabilities": {
                "textDocument": {
                    "synchronization": {"didSave": True, "dynamicRegistration": True},
                    "completion": {"dynamicRegistration": True, "completionItem": {"snippetSupport": True}},
                    "definition": {"dynamicRegistration": True},
                    "references": {"dynamicRegistration": True},
                    "documentSymbol": {

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Remove the install directory and rerun so deps.install does a clean `npm install some-sass-language-server@<version>`.
  2. Check that the pinned package_version exists and exposes the expected bin (`npm view some-sass-language-server@<version> bin`).
  3. Update the pinned version to a release whose binary name matches LS_BIN_NAME.
  4. Run the npm install manually in the install dir to surface the underlying npm error.

Example fix

// before: stale pin
package_version = "0.1.0"  # no bin in this release
// after
package_version = "1.4.0"  # publishes the expected binary
Defensive patterns

Strategy: try-catch

Validate before calling

import subprocess
r = subprocess.run(["npm", "view", f"some-sass-language-server@{package_version}", "bin"], capture_output=True, text=True)
if r.returncode != 0 or expected_bin not in r.stdout:
    raise SystemExit("Pin a version whose bin matches the expected binary name")

Type guard

def sass_ls_bin_published(version: str, expected_bin: str) -> bool:
    import subprocess
    r = subprocess.run(
        ["npm", "view", f"some-sass-language-server@{version}", "bin"],
        capture_output=True, text=True,
    )
    return r.returncode == 0 and expected_bin in r.stdout

Try / catch

try:
    server = SomeSassLanguageServer(config, repo_root, settings)
except FileNotFoundError as e:
    if "did not produce the expected binary" in str(e):
        shutil.rmtree(install_dir, ignore_errors=True)
        server = SomeSassLanguageServer(config, repo_root, settings)
    else:
        raise

Prevention

When it happens

Trigger: Initializing the Some-Sass language server when node_modules/some-sass-language-server@version installs but its bin link or platform binary is missing at the expected path: npm registry serving a changed package layout, version pin pointing to a release without the bin, or partial install.

Common situations: Pinned package_version no longer matching the published package's bin field (package restructured upstream), offline/cached npm installs, permission problems creating node_modules/.bin links on Windows.

Related errors


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