google-gemini/gemini-cli · error · OrchestrationError

Failed to install NPM dependencies in PR workspace: {e}

Error message

Failed to install NPM dependencies in PR workspace: {e}

What it means

Error "Failed to install NPM dependencies in PR workspace: {e}" thrown in google-gemini/gemini-cli.

Source

Thrown at tools/caretaker-agent/cloudrun/pr-generator/workflow/orchestrator.py:213

        try:
            branch_name = f"ssr-agent-{sanitize_identifier(str(issue_num))}"

            # Sync repository and check out target branch
            self._sync_or_clone_repository()
            try:
                # TODO: Add logic to fetch and checkout the existing branch if responding to user feedback
                CommandExecutor.run(["git", "checkout", "-B", branch_name, "origin/main"], self.config.pr_repo_path)
            except CommandExecutionError as e:
                raise OrchestrationError(f"Failed to checkout feature branch {branch_name}: {e}") from e

            # Install project NPM dependencies inside PR workspace
            logging.info("Installing node dependencies inside PR repository workspace...")
            try:
                npm_install_cmd = 'NODE_OPTIONS="--max-old-space-size=4096" npm ci --no-audit --no-fund --maxsockets 3'
                CommandExecutor.run(npm_install_cmd, self.config.pr_repo_path)
            except CommandExecutionError as e:
                raise OrchestrationError(f"Failed to install NPM dependencies in PR workspace: {e}") from e

            # Persist the specifications file inside the PR repo workspace
            spec_pr_path = os.path.join(self.config.pr_repo_path, "firestore_doc.json")
            try:
                with open(spec_pr_path, "w", encoding="utf-8") as f:
                    json.dump(firestore_doc, f, indent=2)
            except IOError as e:
                raise OrchestrationError(f"Failed to save firestore_doc.json to workspace: {e}") from e

            approved = False
            loop_count = 0
            verdict = "NEEDS_REVISION"
            commit_line_count = 0

            while loop_count < self.config.max_attempts and not approved:
                loop_count += 1
                logging.info("=== Starting Iteration %s/%s ===", loop_count, self.config.max_attempts)

View on GitHub (pinned to 5024443c72)

When it happens

Trigger: Thrown at tools/caretaker-agent/cloudrun/pr-generator/workflow/orchestrator.py:213 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of google-gemini/gemini-cli@5024443c72 (2026-08-12). Data as JSON: /api/errors/681c8601ac119f46. Report an issue: GitHub.