cube-js/cube · error
The following packages could not be resolved: ${diff.join(',
Error message
The following packages could not be resolved: ${diff.join(', ')} What it means
Validation error in the DependencyTree constructor: after walking the dependency graph from the root, some of the requested templatePackages were never reached — they are absent from the template's package manifest or not connected to the resolved root, so the tree cannot be built for them.
Source
Thrown at packages/cubejs-templates/src/DependencyTree.ts:22
name: string;
version: string;
installsTo: string[] | null;
receives: Record<string, string>;
};
const indexByName = (packages: Package[]) => R.indexBy(R.prop('name'), packages);
export class DependencyTree {
protected rootNode: any = null;
protected resolved: any[] = [];
public constructor(private manifest: Record<string, unknown>, private templatePackages: string[]) {
this.build(this.getRootNode());
const diff = R.difference(templatePackages, this.resolved);
if (diff.length) {
throw new Error(`The following packages could not be resolved: ${diff.join(', ')}`);
}
}
protected packages() {
return <Package[]> this.manifest.packages;
}
public getRootNode() {
if (this.rootNode) {
return this.rootNode;
}
const rootPackages = this.packages().filter((pkg) => pkg.installsTo == null);
const root = rootPackages.find((pkg) => this.templatePackages.includes(pkg.name));
if (!root) {
throw new Error('root package not found');
}View on GitHub (pinned to 7d981676b3)
Solutions
- Check that every package listed in templatePackages exists in the template manifest's packages array.
- Verify each listed package is reachable from the root package (packages with installsTo == null) via installsTo links.
- Remove or correct misspelled package names in the template configuration.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/cubejs-templates/src/DependencyTree.ts:22 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/454db703fa036e6b.
Report an issue: GitHub.