diegosouzapw/OmniRoute · error · Error
Local corpus root must point to a directory
Error message
Local corpus root must point to a directory
What it means
Error "Local corpus root must point to a directory" thrown in diegosouzapw/OmniRoute.
Source
Thrown at src/lib/localCorpus/index.ts:282
const suffix = end < content.length ? "…" : "";
return `${prefix}${content.slice(start, end).trim()}${suffix}`;
}
export async function canonicalizeLocalCorpusRoot(inputPath: string): Promise<string> {
if (!path.isAbsolute(inputPath)) {
throw new Error("Local corpus root must be an absolute directory path");
}
let canonical: string;
let stat;
try {
canonical = await fs.realpath(path.resolve(inputPath));
stat = await fs.stat(canonical);
} catch {
throw new Error("Local corpus root is not accessible");
}
if (!stat.isDirectory()) {
throw new Error("Local corpus root must point to a directory");
}
return canonical;
}
export class LocalCorpusIndex {
private readonly configuredRoot: string;
private readonly limits: ResolvedLimits;
private canonicalRoot: string | null = null;
private files = new Map<string, IndexedCorpusFile>();
private lastIndexedAt: number | null = null;
private truncated = false;
private refreshPromise: Promise<LocalCorpusRefreshResult> | null = null;
constructor(rootPath: string, limits: LocalCorpusLimits = {}) {
this.configuredRoot = rootPath;
this.limits = resolveLimits(limits);
}
View on GitHub (pinned to a179ffed5b)
When it happens
Trigger: Thrown at src/lib/localCorpus/index.ts:282 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/2876524e6c4ddc37.
Report an issue: GitHub.