cube-js/cube · error
The schema file for "${cubeName}" cube was not found or coul
Error message
The schema file for "${cubeName}" cube was not found or could not be updated. Only JS and non-templated YAML files are supported. What it means
Not a thrown error: in the DevServer pre-aggregation conversion endpoint, after a successful schema conversion this 400 JSON response is returned when no generated source file matches the requested cubeName — the converter could not produce/update a schema file for that cube, typically because the source is a templated YAML or otherwise unsupported format.
Source
Thrown at packages/cubejs-server-core/src/core/DevServer.ts:644
new CubePreAggregationConverter({
cubeName,
preAggregationName,
code
})
]);
try {
await schemaConverter.generate(cubeName);
} catch (error) {
return res.status(400).json({ error: (error as Error).message || error });
}
const file = schemaConverter.getSourceFiles().find(
({ cubeName: currentCubeName }) => currentCubeName === cubeName
);
if (!file) {
return res.status(400).json({ error: `The schema file for "${cubeName}" cube was not found or could not be updated. Only JS and non-templated YAML files are supported.` });
}
this.cubejsServer.repository.writeDataSchemaFile(file.fileName, file.source);
return res.json('ok');
}));
}
protected getIdentifier(apiSecret: string): string {
return crypto.createHash('md5')
.update(apiSecret)
.digest('hex')
.replace(/[^\d]/g, '')
.slice(0, 10);
}
}
View on GitHub (pinned to 7d981676b3)
Solutions
- Convert the cube's schema to plain (non-templated) YAML or JavaScript before attempting pre-aggregation conversion.
- Verify the cubeName matches the cube defined in the repository files.
- Check repository data sources are configured so the converter can locate the schema file.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cubejs-server-core/src/core/DevServer.ts:644 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/0f8cb1da77269eab.
Report an issue: GitHub.