midudev/autoskills · error · Error
Registry manifest not found
Error message
Registry manifest not found: ${MANIFEST_PATH} What it means
validate-registry.mjs validates the skills registry manifest before checking individual skills. In main(), it first checks that the registry manifest file exists at MANIFEST_PATH; if not, it throws this Error and aborts validation. It means the script cannot find the registry manifest JSON it needs to compare declared skills against.
Solutions
- Run the manifest generation step (whatever script writes the registry manifest) before running validate-registry.mjs.
- Verify MANIFEST_PATH exists: `ls` the path printed in the error message; restore the file from git (`git checkout -- <path>`).
- Run the script from the repository root (or the working directory MANIFEST_PATH is resolved against) so relative paths resolve correctly.
Example fix
// before (CI workflow) - run: node packages/autoskills/scripts/validate-registry.mjs // after - run: node packages/autoskills/scripts/sync-registry.mjs - run: node packages/autoskills/scripts/validate-registry.mjs
Defensive patterns
Strategy: validation
Validate before calling
import { existsSync } from "node:fs";
const MANIFEST_PATH = "packages/autoskills/registry.json";
if (!existsSync(MANIFEST_PATH)) {
throw new Error(`Registry manifest missing; run the registry sync script first: ${MANIFEST_PATH}`);
} Try / catch
try {
validateRegistry();
} catch (err) {
if (String(err.message).startsWith("Registry manifest not found")) {
console.error("Generate the manifest before validating.");
process.exitCode = 1;
} else throw err;
} Prevention
- Chain manifest generation before validation in package.json scripts and CI pipelines.
- Run scripts from the repo root so relative paths resolve consistently.
- Commit the registry manifest or ensure it is a build artifact generated in the same job.
When it happens
Trigger: Running `validate-registry.mjs` when the file at MANIFEST_PATH (the registry manifest JSON path resolved by the script) does not exist on disk — e.g. the manifest was deleted, renamed, or the script is run from a context where the relative path no longer resolves.
Common situations: Running the validator in CI before the manifest is generated; deleting or renaming the registry manifest during a refactor; running the script from the wrong working directory if MANIFEST_PATH is relative; a fresh clone missing a generated manifest file.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
AI-assisted analysis of midudev/autoskills@0ec725320d (2026-09-15).
Data as JSON: /api/errors/1b66967537589c4f.
Report an issue: GitHub.
Appendix: source
Thrown at packages/autoskills/scripts/validate-registry.mjs:83
continue;
}
const actualSha = sha256Hex(readFileSync(filePath));
if (shaMap[file] !== actualSha) {
errors.push(`${skillName}: hash mismatch for ${file}`);
}
parts.push(`${file}:${actualSha}`);
}
const actualBundleHash = sha256Hex(parts.sort().join("\n"));
if (entry.bundleHash !== actualBundleHash) {
errors.push(`${skillName}: bundleHash mismatch`);
}
}
function main() {
if (!existsSync(MANIFEST_PATH)) {
throw new Error(`Registry manifest not found: ${MANIFEST_PATH}`);
}
const manifest = JSON.parse(readFileSync(MANIFEST_PATH, "utf-8"));
const registrySkills = manifest.skills || {};
const { declared, conflicts } = collectDeclaredSkills();
const errors = [];
for (const conflict of conflicts) errors.push(conflict);
for (const [skillName, declaredSkill] of declared) {
const entry = registrySkills[skillName];
if (!entry) {
errors.push(
`${skillName}: declared in skills map (${formatSources(declaredSkill.sources)}) but missing from registry`,
);
continue;
}
View on GitHub (pinned to 0ec725320d)