{"record":{"id":"a848676fd3e86911","repo":"oraios/serena","slug":"ls-bin-name-executable-not-found-at-executable","errorCode":null,"errorMessage":"{LS_BIN_NAME} executable not found at {executable_path}; npm install of some-sass-language-server@{package_version} did not produce the expected binary.","messagePattern":"(.+?) executable not found at (.+?); npm install of some-sass-language-server@(.+?) did not produce the expected binary\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/some_sass_language_server.py","lineNumber":149,"sourceCode":"                executable_path += \".cmd\"\n\n            if not os.path.exists(executable_path):\n                expected_version = f\"some-sass-language-server@{package_version}\"\n                log.info(\"Installing %s...\", expected_version)\n                deps = RuntimeDependencyCollection(\n                    [\n                        RuntimeDependency(\n                            id=\"some-sass-language-server\",\n                            description=\"Some Sass language server (SCSS / Sass / CSS)\",\n                            command=build_npm_install_command(\"some-sass-language-server\", package_version, npm_registry),\n                            platform_id=\"any\",\n                        ),\n                    ]\n                )\n                deps.install(install_dir)\n\n            if not os.path.exists(executable_path):\n                raise FileNotFoundError(\n                    f\"{LS_BIN_NAME} executable not found at {executable_path}; \"\n                    f\"npm install of some-sass-language-server@{package_version} did not produce the expected binary.\"\n                )\n            return executable_path\n\n        def _create_launch_command(self, core_path: str) -> list[str]:\n            return [core_path, \"--stdio\"]\n\n    def _create_base_initialize_params(self) -> dict:\n        initialize_params: dict = {\n            \"locale\": \"en\",\n            \"capabilities\": {\n                \"textDocument\": {\n                    \"synchronization\": {\"didSave\": True, \"dynamicRegistration\": True},\n                    \"completion\": {\"dynamicRegistration\": True, \"completionItem\": {\"snippetSupport\": True}},\n                    \"definition\": {\"dynamicRegistration\": True},\n                    \"references\": {\"dynamicRegistration\": True},\n                    \"documentSymbol\": {","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/some_sass_language_server.py#L131-L167","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","solutions":["Remove the install directory and rerun so deps.install does a clean `npm install some-sass-language-server@<version>`.","Check that the pinned package_version exists and exposes the expected bin (`npm view some-sass-language-server@<version> bin`).","Update the pinned version to a release whose binary name matches LS_BIN_NAME.","Run the npm install manually in the install dir to surface the underlying npm error."],"exampleFix":"// before: stale pin\npackage_version = \"0.1.0\"  # no bin in this release\n// after\npackage_version = \"1.4.0\"  # publishes the expected binary","handlingStrategy":"try-catch","validationCode":"import subprocess\nr = subprocess.run([\"npm\", \"view\", f\"some-sass-language-server@{package_version}\", \"bin\"], capture_output=True, text=True)\nif r.returncode != 0 or expected_bin not in r.stdout:\n    raise SystemExit(\"Pin a version whose bin matches the expected binary name\")","typeGuard":"def sass_ls_bin_published(version: str, expected_bin: str) -> bool:\n    import subprocess\n    r = subprocess.run(\n        [\"npm\", \"view\", f\"some-sass-language-server@{version}\", \"bin\"],\n        capture_output=True, text=True,\n    )\n    return r.returncode == 0 and expected_bin in r.stdout","tryCatchPattern":"try:\n    server = SomeSassLanguageServer(config, repo_root, settings)\nexcept FileNotFoundError as e:\n    if \"did not produce the expected binary\" in str(e):\n        shutil.rmtree(install_dir, ignore_errors=True)\n        server = SomeSassLanguageServer(config, repo_root, settings)\n    else:\n        raise","preventionTips":["Verify the pinned package version still publishes the expected bin via `npm view ... bin`.","Update the version pin when the upstream package changes its binary name.","Clean-install (delete install dir) after changing the pinned version."],"tags":["sass","npm","binary-missing","install"],"backgroundTag":"language-server-binary-not-found","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}