cube-js/cube · error · UserError
${cubeName}${refProperty ? `.${refProperty}` : ''}.${propert
Error message
${cubeName}${refProperty ? `.${refProperty}` : ''}.${propertyName} cannot be resolved. There's no such member or cube. What it means
During SQL resolution (cubeReferenceProxy), accessing `cubeName.memberName` on the cube proxy must resolve to a member of that cube or a known symbol/cube. When a string property matches neither, the compiler throws this UserError saying the member or cube cannot be resolved. It is the standard 'undefined column/member' error of schema compilation.
Source
Thrown at packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts:1517
self.resolveGranularity([cubeName, refProperty, 'granularities', propertyName], cube)
) {
return {
toString: () => this.withSymbolsCallContext(
() => sqlResolveFn(cube[refProperty], cubeName, refProperty, propertyName),
{ ...this.resolveSymbolsCallContext },
),
};
}
if (cube[propertyName as string]) {
// We put cubeName at the beginning of the cubeReferenceProxy(), no need to add it again
// so let's cut it off from joinHints
return this.cubeReferenceProxy(cubeName, joinHints?.slice(0, -1), propertyName);
}
if (self.symbols[propertyName]) {
return this.cubeReferenceProxy(propertyName, joinHints);
}
if (typeof propertyName === 'string') {
throw new UserError(`${cubeName}${refProperty ? `.${refProperty}` : ''}.${propertyName} cannot be resolved. There's no such member or cube.`);
}
return undefined;
}
});
}
/**
* Tries to resolve Granularity object.
* For predefined granularity it constructs it on the fly.
* @param {string|string[]} path
* @param [refCube] Optional cube object to operate on
*/
public resolveGranularity(path: string | string[], refCube?: any) {
const [cubeName, dimName, gr, granName] = Array.isArray(path) ? path : path.split('.');
const cube = refCube || this.symbols[cubeName];
// Calendar cubes time dimensions may define custom sql for predefined granularities,
// so we need to check if such granularity exists in cube definition.View on GitHub (pinned to 7d981676b3)
Solutions
- Check the exact spelling of the cube name and member name against the data model.
- Confirm the member still exists (it may have been renamed or removed) and update references.
- Ensure the referenced cube is joined (or add a join) so its members are reachable from the query.
- Run schema validation / compile the project to list all unresolved references.
Example fix
// before
measure: { type: 'count', sql: '\${Orders.customr_id}' }
// after
measure: { type: 'count', sql: '\${Orders.customer_id}' } Defensive patterns
Strategy: validation
Validate before calling
// before querying/compiling, verify member exists in meta
const meta = await cubeApi.meta();
const exists = meta.cubes.some(c => c.name === 'Orders' &&
[...c.measures, ...c.dimensions].some(m => m.name === 'Orders.customerId'));
if (!exists) throw new Error('Orders.customerId does not exist'); Type guard
function memberExists(meta, cubeName, member) {
const c = meta.cubes.find(c => c.name === cubeName);
return !!c && [...c.measures, ...c.dimensions, ...(c.segments || [])].some(m => m.name === `${cubeName}.${member}`);
} Try / catch
try { await cubeApi.load(query); } catch (e) { if (/cannot be resolved.*no such member or cube/.test(e.message)) { console.error('Check member name / join path in data model'); } throw e; } Prevention
- Validate queries against /meta before execution
- Search for old member names when renaming
- Add joins for every cube you reference from a query
When it happens
Trigger: A query or schema references `${MyCube.someMeasure}` where someMeasure does not exist on MyCube (typo, deleted member, or wrong cube name), and the property isn't a registered symbol either.
Common situations: Renaming a measure/dimension but missing a usage in a dashboard, pre-aggregation, or join; referencing a member from a cube that isn't joined; case-sensitivity typos; referencing a cube by an alias that doesn't exist.
Related errors
- ${context} must be a single reference, not an array
- ${cubeName}.${propertyName} cannot be resolved. There's no s
- Expected one parameter but nothing found
- Expected only 2 parameters for timestamp filter but got: ${t
- Unsupported timestamp precision: ${this.query.timestampPreci
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/6a15c14c6dc183b3.
Report an issue: GitHub.