{"record":{"id":"ae7443c3cedbd299","repo":"HKUDS/nanobot","slug":"registry-entry-has-no-npm-package","errorCode":null,"errorMessage":"registry entry has no npm_package","messagePattern":"registry entry has no npm_package","errorType":"exception","errorClass":"CliAppError","httpStatus":null,"severity":"error","filePath":"nanobot/apps/cli/service.py","lineNumber":908,"sourceCode":"        if distribution:\n            return [*prefix, distribution]\n        uninstall_cmd = str(app.get(\"uninstall_cmd\") or \"\")\n        packages = _pip_uninstall_args_from_command(uninstall_cmd)\n        if packages:\n            return [*prefix, *packages]\n        package = str(app.get(\"pip_package\") or \"\").strip() or self._pip_package_from_install(app)\n        if not package:\n            entry_point = str(app.get(\"entry_point\") or \"\").strip()\n            package = entry_point if entry_point.startswith(\"cli-anything-\") else f\"cli-anything-{_brand_key(str(app['name']))}\"\n        return [*prefix, package]\n\n    def _npm_argv(self, app: dict[str, Any], action: str) -> list[str]:\n        npm = shutil.which(\"npm\")\n        if not npm:\n            raise CliAppError(\"npm is not installed\")\n        package = str(app.get(\"npm_package\") or \"\")\n        if not package:\n            raise CliAppError(\"registry entry has no npm_package\")\n        if action == \"install\":\n            return [npm, \"install\", \"-g\", package]\n        if action == \"update\":\n            return [npm, \"install\", \"-g\", package + \"@latest\"]\n        return [npm, \"uninstall\", \"-g\", package]\n\n    def _cleanup_stale_npm_install(self, app: dict[str, Any]) -> bool:\n        npm = shutil.which(\"npm\")\n        package = str(app.get(\"npm_package\") or \"\").strip()\n        if not npm or not package or \"/\" in package or _SAFE_NPM_DIR_RE.match(package) is None:\n            return False\n        result = self._run_argv([npm, \"root\", \"-g\"], timeout=min(self.runtime.install_timeout, 30))\n        if result.returncode != 0:\n            return False\n        root = Path(result.stdout.strip()).expanduser()\n        try:\n            root = root.resolve(strict=True)\n        except OSError:","sourceCodeStart":890,"sourceCodeEnd":926,"githubUrl":"https://github.com/HKUDS/nanobot/blob/42f37dc4c0e409eac7818a82d165c5f2757bc075/nanobot/apps/cli/service.py#L890-L926","documentation":"Error \"registry entry has no npm_package\" thrown in HKUDS/nanobot.","triggerScenarios":"Thrown at nanobot/apps/cli/service.py:908 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"}