perspective-dev/perspective · error
docs corpus: missing, skipping API chunks
Error message
docs corpus: ${file} missing, skipping API chunks What it means
Warning in the docs-corpus builder: a .d.ts file listed in DOCS_DTS_FILES is missing, so its API reference chunks are omitted from the corpus. The docs build continues with reduced API coverage; this indicates generated type definitions weren't built yet or a stale manifest entry.
Solutions
- Build the missing .d.ts artifacts before running buildDocsCorpus
- Update DOCS_DTS_FILES if the file was renamed or removed
- Check earlier build steps for silent failures that skipped type generation
- Accept the warning for partial docs when the file is intentionally absent
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at rust/perspective-viewer/tools.mjs:326 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of perspective-dev/perspective@11c8238c0c (2026-09-09).
Data as JSON: /api/errors/c78899679ccfb904.
Report an issue: GitHub.
Appendix: source
Thrown at rust/perspective-viewer/tools.mjs:326
const chunks = [];
const md_files = [
...DOCS_MD_ROOTS.filter(fs.existsSync).flatMap((x) => [
...walkMarkdown(x),
]),
...DOCS_MD_FILES.filter(fs.existsSync),
];
for (const file of md_files) {
chunks.push(...chunkMarkdown(file, fs.readFileSync(file, "utf8")));
}
for (const [file, prefix] of DOCS_DTS_FILES) {
if (fs.existsSync(file)) {
chunks.push(
...chunkDts(file, fs.readFileSync(file, "utf8"), prefix),
);
} else {
console.warn(`docs corpus: ${file} missing, skipping API chunks`);
}
}
const corpus = normalizeChunks(chunks);
const bundle = { schemas: await buildToolSchemas(), chunks: corpus };
const json = JSON.stringify(bundle);
if (json.length > DOCS_RAW_BUDGET) {
console.warn(
`docs corpus: ${json.length} bytes exceeds the ${DOCS_RAW_BUDGET} raw budget - consider pruning the manifest`,
);
}
fs.mkdirSync("dist/docs", { recursive: true });
fs.writeFileSync("dist/docs/perspective-docs.json", json);
return {
chunks: corpus.length,
bytes: json.length,
files: md_files.length,View on GitHub (pinned to 11c8238c0c)