paperclipai/paperclip · error
${packageJsonPath} must declare a package version.
Error message
${packageJsonPath} must declare a package version. What it means
Catalog-builder guard in readPackageJson: the team package's package.json parsed but declares no version field. The generated catalog manifest requires a version per entry, so manifest generation aborts for that package.
Source
Thrown at packages/teams-catalog/src/catalog-builder.ts:167
errors,
};
}
export async function writeCatalogManifest(packageDir: string) {
const result = await buildExpectedCatalogManifest(packageDir);
if (result.errors.length > 0) return result;
const generatedDir = path.join(packageDir, "generated");
await fs.mkdir(generatedDir, { recursive: true });
await fs.writeFile(path.join(generatedDir, "catalog.json"), formatCatalogManifest(result.manifest), "utf8");
return result;
}
async function readPackageJson(packageDir: string) {
const packageJsonPath = path.join(packageDir, "package.json");
const packageJson = JSON.parse(await fs.readFile(packageJsonPath, "utf8")) as { version?: unknown };
const version = asString(packageJson.version);
if (!version) throw new Error(`${packageJsonPath} must declare a package version.`);
return { version };
}
async function readExistingManifest(packageDir: string): Promise<CatalogManifest | null> {
try {
return JSON.parse(await fs.readFile(path.join(packageDir, "generated", "catalog.json"), "utf8")) as CatalogManifest;
} catch {
return null;
}
}
async function loadCatalogSkills(packageDir: string, errors: string[]): Promise<CatalogSkillSummary[]> {
try {
const catalogPackageName = "@paperclipai/skills-catalog";
const catalog = await import(catalogPackageName) as { catalogSkills: CatalogSkillSummary[] };
const skills = catalog.catalogSkills as CatalogSkillSummary[];
return skills.map((skill) => ({ id: skill.id, key: skill.key, slug: skill.slug }));
} catch {View on GitHub (pinned to 120ae5428f)
Solutions
- Add a "version" field to the package.json at the reported path.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/teams-catalog/src/catalog-builder.ts:167 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18).
Data as JSON: /api/errors/600aeba6c0aa0540.
Report an issue: GitHub.