cube-js/cube · error · UserError
Can't resolve member '${Array.isArray(path) ? path.join('.')
Error message
Can't resolve member '${Array.isArray(path) ? path.join('.') : path}' What it means
This resolver iterates measures, dimensions, and segments via isInstanceOfType/byPath and throws a UserError when the path matches none of these member types. The cube and path format may be fine, but the member either doesn't exist or isn't a measure/dimension/segment.
Source
Thrown at packages/cubejs-schema-compiler/src/compiler/CubeEvaluator.ts:1067
const cubeAndName = Array.isArray(path) ? path : path.split('.');
const symbol = this.evaluatedCubes[cubeAndName[0]]?.[type]?.[cubeAndName[1]];
return symbol !== undefined;
}
public byPathAnyType(path: string | string[]) {
if (this.isInstanceOfType('measures', path)) {
return this.byPath('measures', path);
}
if (this.isInstanceOfType('dimensions', path)) {
return this.byPath('dimensions', path);
}
if (this.isInstanceOfType('segments', path)) {
return this.byPath('segments', path);
}
throw new UserError(`Can't resolve member '${Array.isArray(path) ? path.join('.') : path}'`);
}
public byPath<T extends 'measures' | 'dimensions' | 'segments' | 'preAggregations'>(type: T, path: string | string[]): EvaluatedCube[T][string] {
if (!type) {
throw new Error(`Type can't be undefined for '${path}'`);
}
if (!path) {
throw new Error('Path can\'t be undefined');
}
const cubeAndName = Array.isArray(path) ? path : path.split('.');
const cube = this.evaluatedCubes[cubeAndName[0]];
if (cube === undefined) {
throw new UserError(`Cube '${cubeAndName[0]}' not found for path '${path}'`);
}
const typeMembers = cube[type];View on GitHub (pinned to 7d981676b3)
Solutions
- Verify the member exists as a measure, dimension, or segment in the cube/view
- Fix typos in the member name after the dot
- Check public:false / security filters aren't hiding the member from this context
- Regenerate client schemas after schema changes
Example fix
// before query.measures = ['Orders.notARealMeasure']; // after query.measures = ['Orders.totalAmount'];
Defensive patterns
Strategy: try-catch
Validate before calling
const { cubeEvaluator } = compilerApi;
const resolved = ['measures','dimensions','segments'].find(t => cubeEvaluator.isInstanceOfType(t, path));
if (!resolved) throw new Error(`'${path}' is not a measure, dimension or segment`); Try / catch
try { return evaluator.resolveMember(path); } catch (e) { if (e.message.startsWith("Can't resolve member")) { /* inspect cube members for a close match */ } throw e; } Prevention
- Regenerate client schemas after model changes
- Check public:/security visibility when members vanish
- Validate measures/dimensions/segments lists against the compiled cube before querying
When it happens
Trigger: Calling cubeFromPath/memberFromPath/resolveMember with a valid 'Cube.name' path where name is not an existing measure, dimension, or segment — e.g. referencing a timeDimension-only pseudo member or a deleted measure.
Common situations: Stale client queries referencing renamed members; using a pre-aggregation or hierarchy name where a member is expected; typo in member name with correct cube; member filtered out by security context/public visibility.
Related errors
- Not full member name provided: ${path[0]}
- Can't parse date: '${from}'
- Can't parse date: '${to}'
- Can't parse date: '${dateString}'
- Invalid Job query format: ${error.message || error.toString(
AI-assisted analysis of cube-js/cube@7d981676b3 (2026-09-02).
Data as JSON: /api/errors/e09f7bff5bd5fcd3.
Report an issue: GitHub.