{"record":{"id":"793623ecdcb68443","repo":"oraios/serena","slug":"nixd-nix-language-server-is-not-installed-pleas","errorCode":null,"errorMessage":"nixd (Nix Language Server) is not installed.\nPlease install nixd using one of the following methods:\n  - Using Nix flakes: nix profile install github:nix-community/nixd\n  - From nixpkgs: nix-env -iA nixpkgs.nixd\n  - On macOS with Homebrew: brew install nixd\n\nAfter installation, make sure 'nixd' is in your PATH.","messagePattern":"nixd \\(Nix Language Server\\) is not installed\\.\nPlease install nixd using one of the following methods:\n  - Using Nix flakes: nix profile install github:nix-community/nixd\n  - From nixpkgs: nix-env -iA nixpkgs\\.nixd\n  - On macOS with Homebrew: brew install nixd\n\nAfter installation, make sure 'nixd' is in your PATH\\.","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/nixd_ls.py","lineNumber":124,"sourceCode":"                log.error(\"Nix install timed out after 10 minutes\")\n            except Exception:\n                log.exception(\"Error installing nixd with nix\")\n\n            return None\n\n        def _get_or_install_core_dependency(self) -> str:\n            \"\"\"Return a working nixd path, installing nixd when necessary.\"\"\"\n            if not shutil.which(\"nix\"):\n                log.error(\"Nix is not installed. nixd requires Nix to function properly.\")\n                raise RuntimeError(\"Nix is required for nixd. Please install Nix from https://nixos.org/download.html\")\n\n            nixd_path = self._get_nixd_path()\n            if not nixd_path:\n                log.info(\"nixd not found. Attempting to install...\")\n                nixd_path = self._install_nixd_with_nix()\n\n            if not nixd_path:\n                raise RuntimeError(\n                    \"nixd (Nix Language Server) is not installed.\\n\"\n                    \"Please install nixd using one of the following methods:\\n\"\n                    \"  - Using Nix flakes: nix profile install github:nix-community/nixd\\n\"\n                    \"  - From nixpkgs: nix-env -iA nixpkgs.nixd\\n\"\n                    \"  - On macOS with Homebrew: brew install nixd\\n\\n\"\n                    \"After installation, make sure 'nixd' is in your PATH.\"\n                )\n\n            try:\n                result = subprocess_run([nixd_path, \"--version\"], capture_output=True, text=True, check=False, timeout=5)\n                if result.returncode != 0:\n                    raise RuntimeError(f\"nixd failed to run: {result.stderr}\")\n            except Exception as exc:\n                raise RuntimeError(f\"Failed to verify nixd installation: {exc}\") from exc\n\n            return nixd_path\n\n        def _create_launch_command(self, core_path: str) -> list[str]:","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/nixd_ls.py#L106-L142","documentation":"After confirming Nix exists, _get_or_install_core_dependency tries _get_nixd_path() and then _install_nixd_with_nix(). If both fail to yield a nixd executable, RuntimeError is raised listing all supported installation methods (Nix flake, nixpkgs, Homebrew).","triggerScenarios":"Starting the nixd language server when nixd is neither pre-installed nor on PATH, and the automatic install via Nix fails or produces no usable path.","commonSituations":"Nix present but nixd never installed; the `nix profile install` step fails offline or due to missing flake support in old Nix versions; nixd installed but not on PATH of the process environment.","solutions":["Run: nix profile install github:nix-community/nixd (Nix flakes) or nix-env -iA nixpkgs.nixd.","Or install via Homebrew on macOS: brew install nixd.","Verify `nixd` resolves on PATH with `which nixd`; if installed elsewhere, add its directory to PATH."],"exampleFix":"// before\n# nixd not installed\n// after\nnix profile install github:nix-community/nixd","handlingStrategy":"validation","validationCode":"import shutil\nif not shutil.which(\"nixd\"):\n    raise SystemExit(\"Install nixd: nix profile install github:nix-community/nixd\")","typeGuard":null,"tryCatchPattern":"try:\n    server = NixdLanguageServer(...)\nexcept RuntimeError as e:\n    if \"nixd (Nix Language Server) is not installed\" in str(e):\n        subprocess.run([\"nix\", \"profile\", \"install\", \"github:nix-community/nixd\"], check=True)\n    else:\n        raise","preventionTips":["Preinstall nixd in CI images; do not rely on auto-install at startup.","Verify `which nixd` after installation and before starting the server.","Add nixd to your dev-environment bootstrap script."],"tags":["nixd","missing-dependency","language-server"],"backgroundTag":"missing-required-binary","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}