diegosouzapw/OmniRoute · error · HeadroomError
NOT_INSTALLED
NOT_INSTALLED
Error message
Headroom CLI not installed
What it means
Error "Headroom CLI not installed" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/headroom/process.ts:95
} catch {
return false;
}
}
export function getManagedPid(): number | null {
const pid = readPid();
return pid && isPidAlive(pid) ? pid : null;
}
function safePort(port: unknown): number {
const n = Number(port);
return Number.isFinite(n) && n > 0 && n < 65536 ? n : DEFAULT_PORT;
}
export async function startHeadroomProxy(opts: { port?: number } = {}): Promise<StartResult> {
const binary = findHeadroomBinary();
if (!binary) {
throw new HeadroomError("Headroom CLI not installed", "NOT_INSTALLED");
}
const existing = getManagedPid();
if (existing) return { pid: existing, alreadyRunning: true };
ensureDir();
const outFd = fs.openSync(LOG_FILE, "a");
// spawn (no shell) with array args — argv is passed directly to the
// headroom binary, so no shell-metacharacter handling is needed.
const child = spawn(binary, ["proxy", "--port", String(safePort(opts.port))], {
stdio: ["ignore", outFd, outFd],
detached: true,
windowsHide: true,
env: { ...process.env },
});
if (!child.pid) {View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/headroom/process.ts:95 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/1b5430a9db66cf3b.
Report an issue: GitHub.