musistudio/claude-code-router · error

Image export target is unavailable.

Error message

Image export target is unavailable.

What it means

Error "Image export target is unavailable." thrown in musistudio/claude-code-router.

Source

Thrown at packages/electron/src/main/ipc.ts:663

function finiteNumber(value: unknown, label: string): number {
  if (typeof value !== "number" || !Number.isFinite(value)) {
    throw new Error(`Invalid ${label}.`);
  }
  return value;
}

function safePngFileName(value: string): string {
  const raw = typeof value === "string" ? value : "";
  const safe = path.basename(raw).replace(/[<>:"/\\|?*\x00-\x1f]/g, "-").trim() || "ccr-share-card.png";
  return safe.toLowerCase().endsWith(".png") ? safe : `${safe}.png`;
}

function consumeImageExportTarget(exportId: string): string {
  const target = imageExportTargets.get(exportId);
  imageExportTargets.delete(exportId);
  if (!target) {
    throw new Error("Image export target is unavailable.");
  }
  return target;
}

const pngSignature = Buffer.from([0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a]);

type PngExportProcessingRequest = {
  borderRadius?: number;
  output?: {
    height: number;
    width: number;
  };
};

type DecodedPngPixels = {
  bitDepth: number;
  colorType: 2 | 6;
  height: number;

View on GitHub (pinned to 99f24806c6)

When it happens

Trigger: Thrown at packages/electron/src/main/ipc.ts:663 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/f1f6121e202839a7. Report an issue: GitHub.