musistudio/claude-code-router · error · Error

CCR CLI runtime was not found. Rebuild or reinstall CCR and

Error message

CCR CLI runtime was not found. Rebuild or reinstall CCR and try again. Checked: ${candidates.join(", ")}

What it means

Error "CCR CLI runtime was not found. Rebuild or reinstall CCR and try again. Checked: ${candidates.join(", ")}" thrown in musistudio/claude-code-router.

Source

Thrown at packages/core/src/profiles/launch-service.ts:1763

    source.includes("ELECTRON_RUN_AS_NODE=1") &&
    source.includes("CCR_NODE_BIN");
}

function findBundledCcrCliSource(): string {
  const resourcesPath = (process as NodeJS.Process & { resourcesPath?: string }).resourcesPath;
  const candidates = [
    path.join(__dirname, "cli.js"),
    ...(resourcesPath
      ? [
          path.join(resourcesPath, "app.asar", "dist", "main", "cli.js"),
          path.join(resourcesPath, "app", "dist", "main", "cli.js")
        ]
      : []),
    path.join(process.cwd(), "dist", "main", "cli.js")
  ];
  const source = candidates.find((candidate) => existsSync(candidate));
  if (!source) {
    throw new Error(`CCR CLI runtime was not found. Rebuild or reinstall CCR and try again. Checked: ${candidates.join(", ")}`);
  }
  return source;
}

function ensureBundledToolHubMcpRuntime(file: string): void {
  const source = bundledToolHubMcpEntryPathCandidates().find((candidate) => existsSync(candidate));
  if (!source) {
    return;
  }
  writeFileIfChanged(file, readFileSync(source, "utf8"));
  chmodSafe(file);
}

function posixCcrLauncher(runtimeFile: string): string {
  const nodePath = bundledNodePath();
  return [
    "#!/bin/sh",
    `${desktopCliCommandNameEnv}=${shQuote(desktopCliCommandName)}`,

View on GitHub (pinned to 99f24806c6)

When it happens

Trigger: Thrown at packages/core/src/profiles/launch-service.ts:1763 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of musistudio/claude-code-router@99f24806c6 (2026-08-27). Data as JSON: /api/errors/881d388b06fdc0c9. Report an issue: GitHub.