JuliusBrussee/caveman · error · Error
no JSON schemas found
Error message
no JSON schemas found
What it means
Error "no JSON schemas found" thrown in JuliusBrussee/caveman.
Source
Thrown at packages/shared/contracts/scripts/validate-schemas.mjs:13
import { readdir, readFile } from "node:fs/promises";
import { fileURLToPath } from "node:url";
import path from "node:path";
import Ajv2020 from "ajv/dist/2020.js";
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const schemaRoot = path.join(packageRoot, "schemas");
const files = (await readdir(schemaRoot))
.filter((name) => name.endsWith(".schema.json"))
.sort();
if (files.length === 0) {
throw new Error("no JSON schemas found");
}
const schemas = [];
for (const file of files) {
const schema = JSON.parse(await readFile(path.join(schemaRoot, file), "utf8"));
if (schema.$schema !== "https://json-schema.org/draft/2020-12/schema") {
throw new Error(`${file}: unsupported or missing $schema`);
}
if (typeof schema.$id !== "string" || schema.$id.length === 0) {
throw new Error(`${file}: missing $id`);
}
schemas.push(schema);
}
const ajv = new Ajv2020({ allErrors: true, strict: true });
ajv.addSchema(schemas);
for (const schema of schemas) {
const validate = ajv.getSchema(schema.$id);View on GitHub (pinned to 27d5a3981a)
Solutions
- Add JSON schema files to the contracts directory before validating.
When it happens
Trigger: Thrown at packages/shared/contracts/scripts/validate-schemas.mjs:13 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of JuliusBrussee/caveman@27d5a3981a (2026-08-15).
Data as JSON: /api/errors/4f2c37beed8c90ae.
Report an issue: GitHub.