JuliusBrussee/caveman · error · Error
CAVE_SETUP_TIMEOUT must be a positive integer (got ${JSON.st
Error message
CAVE_SETUP_TIMEOUT must be a positive integer (got ${JSON.stringify(raw)}) What it means
Error "CAVE_SETUP_TIMEOUT must be a positive integer (got ${JSON.stringify(raw)})" thrown in JuliusBrussee/caveman.
Source
Thrown at packages/cli/src/index.ts:1971
type InstalledBinary = {
name: string;
path: string;
sha256: string;
status: "installed" | "already installed";
};
type BinaryInstallManifest = {
release: string;
artifacts: Record<string, string>;
};
const INSTALL_BINARIES = GO_BINARIES.map((binary) => binary.name);
function setupTimeoutSeconds(): number {
const raw = process.env.CAVE_SETUP_TIMEOUT ?? "300";
const parsed = Number(raw);
if (!Number.isInteger(parsed) || parsed <= 0) {
throw new Error(`CAVE_SETUP_TIMEOUT must be a positive integer (got ${JSON.stringify(raw)})`);
}
return parsed;
}
export function setupPlatform(
os: NodeJS.Platform = process.platform,
nodeArch: string = process.arch,
): { os: string; arch: string } {
const arch = nodeArch === "x64" ? "amd64" : nodeArch;
if (!(os === "darwin" || os === "linux" || os === "win32") ||
!(arch === "arm64" || arch === "amd64")) {
throw new Error(OFF_STATES.unsupportedPlatform(os, arch).line);
}
return { os, arch };
}
export function binaryInstallFilename(name: string, os: string = process.platform): string {
return os === "win32" ? `${name}.exe` : name;View on GitHub (pinned to 27d5a3981a)
Solutions
- Set CAVE_SETUP_TIMEOUT to a positive integer (seconds).
When it happens
Trigger: Thrown at packages/cli/src/index.ts:1971 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/4d51b40a96d1adfa.
Report an issue: GitHub.