{"record":{"id":"2697db4256cc605b","repo":"HKUDS/nanobot","slug":"install-failed","errorCode":null,"errorMessage":"install failed","messagePattern":"install failed","errorType":"exception","errorClass":"CliAppError","httpStatus":500,"severity":"error","filePath":"nanobot/apps/cli/service.py","lineNumber":1212,"sourceCode":"            if detect_cmd and _command_exists(detect_cmd):\n                self._record_installed(app)\n                return self.payload() | {\n                    \"last_action\": {\n                        \"ok\": True,\n                        \"message\": f\"CLI for {app['display_name']} is available.\",\n                        \"installed\": True,\n                        \"verification\": [\"entry_point_available\", \"state_recorded\"],\n                    }\n                }\n            note = app.get(\"install_notes\") or f\"{app['display_name']} is bundled with its parent app.\"\n            raise CliAppError(str(note))\n        argv = self._argv_for_action(app, \"install\")\n        assert argv is not None\n        result = self._run_argv(argv, timeout=self.runtime.install_timeout)\n        if strategy == \"npm\" and result.returncode != 0:\n            result = self._retry_stale_npm_install(app, argv, result)\n        if result.returncode != 0:\n            raise CliAppError(_truncate(result.stderr or result.stdout or \"install failed\"), status=500)\n        self._record_installed(app)\n        return self.payload() | {\n            \"last_action\": {\n                \"ok\": True,\n                \"message\": f\"Installed CLI for {app['display_name']}.\",\n                \"installed\": True,\n                \"verification\": [\"package_manager_ok\", \"state_recorded\", \"managed_paths_present\"],\n            }\n        }\n\n    def update(self, name: str) -> dict[str, Any]:\n        app = self.get_app(name, force_refresh=True)\n        if str(app[\"name\"]) not in self._load_installed():\n            raise CliAppError(\"CLI app is not installed\")\n        if self._strategy(app) == \"bundled\":\n            self._record_installed(app)\n            return self.payload() | {\n                \"last_action\": {","sourceCodeStart":1194,"sourceCodeEnd":1230,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/apps/cli/service.py#L1194-L1230","documentation":"Error \"install failed\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/apps/cli/service.py:1212 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"42f37dc4c0e409eac7818a82d165c5f2757bc075","analyzedAt":"2026-08-26T00:18:52.276Z","schemaVersion":2},"datasetVersion":"2026-08-26T04:18:47.238Z"}