oraios/serena · error · FileNotFoundError
vscode-json-languageserver executable not found at {json_exe
Error message
vscode-json-languageserver executable not found at {json_executable_path}, something went wrong with the installation. What it means
The JSON language server is installed via npm (vscode-json-languageserver) into json_ls_dir, but after running deps.install the expected executable still cannot be found, so _get_or_install_core_dependency raises FileNotFoundError indicating the installation did not produce the expected artifact.
Source
Thrown at src/solidlsp/language_servers/json_language_server.py:92
# legacy unversioned dir reserved for INITIAL; every other version goes into a versioned subdir
ls_dirname = (
"json-lsp"
if json_language_server_version == INITIAL_JSON_LANGUAGE_SERVER_VERSION
else f"json-lsp-{json_language_server_version}"
)
json_ls_dir = os.path.join(self._ls_resources_dir, ls_dirname)
json_executable_path = os.path.join(json_ls_dir, "node_modules", ".bin", "vscode-json-languageserver")
if os.name == "nt":
json_executable_path += ".cmd"
if not os.path.exists(json_executable_path):
log.info(f"JSON Language Server executable not found at {json_executable_path}. Installing...")
deps.install(json_ls_dir)
log.info("JSON language server dependencies installed successfully")
if not os.path.exists(json_executable_path):
raise FileNotFoundError(
f"vscode-json-languageserver executable not found at {json_executable_path}, something went wrong with the installation."
)
return json_executable_path
def _create_launch_command(self, core_path: str) -> list[str]:
return [core_path, "--stdio"]
def _create_base_initialize_params(self) -> dict:
"""
Returns the initialize params for the JSON Language Server.
"""
initialize_params = {
"locale": "en",
"capabilities": {
"textDocument": {
"synchronization": {"didSave": True, "dynamicRegistration": True},View on GitHub (pinned to 7fcbca7e62)
Solutions
- Run the install manually inside json_ls_dir (`npm install`) and check npm's stderr for real errors.
- Verify the actual executable location (e.g. json_ls_dir/node_modules/.bin/vscode-json-languageserver) and correct json_executable_path resolution if the package layout changed.
- Ensure node/npm are installed and on PATH, then delete json_ls_dir and let Serena reinstall fresh.
- Check disk space and directory write permissions for json_ls_dir.
Example fix
// before (npm not on PATH, silent failure) # serena start --language json // FileNotFoundError: vscode-json-languageserver executable not found... // after $ which npm && npm -v $ cd <json_ls_dir> && npm install $ ls node_modules/.bin/vscode-json-languageserver
Defensive patterns
Strategy: validation
Validate before calling
import shutil, os
def validate_json_ls_installable(json_ls_dir: str, executable_path: str) -> bool:
if shutil.which("npm") is None:
return False
if not os.access(json_ls_dir, os.W_OK):
return False
return True # then run `npm install` in json_ls_dir and check node_modules/.bin/vscode-json-languageserver Try / catch
try:
json_path = get_or_install_core_dependency()
except FileNotFoundError as e:
if "vscode-json-languageserver" in str(e):
subprocess.run(["npm", "install"], cwd=json_ls_dir, check=True) # surface npm's real error
bin_path = os.path.join(json_ls_dir, "node_modules", ".bin", "vscode-json-languageserver")
if not os.path.exists(bin_path):
raise RuntimeError("npm install produced no vscode-json-languageserver binary") from e
else:
raise Prevention
- Verify node/npm are installed and on PATH before initializing the JSON language server.
- Run `npm install` manually in json_ls_dir once to surface registry/network errors the installer may hide.
- Check the installed package layout; adjust executable path resolution when node_modules/.bin layout differs.
- Monitor disk space and directory permissions in the Serena cache/install directory.
When it happens
Trigger: _get_or_install_core_dependency: json_executable_path does not exist, deps.install(json_ls_dir) runs npm install, but a second os.path.exists(json_executable_path) still fails, raising the error.
Common situations: npm not installed or failing (network/registry errors swallowed); npm installed to a different global/node_modules layout so the binary path differs (e.g. node_modules/.bin/vscode-json-languageserver missing); Node version incompatibility with the package; antivirus or permissions blocking binary creation.
Related errors
- shader-language-server not found at {executable_path}
- typescript-language-server executable not found at {tsserver
- {LS_BIN_NAME} executable not found at {executable_path}; npm
- vue-language-server executable not found at {vue_executable_
- typescript-language-server executable not found at {ts_ls_ex
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/0a8baf7255f5041c.
Report an issue: GitHub.