{"record":{"id":"e09f7bff5bd5fcd3","repo":"cube-js/cube","slug":"can-t-resolve-member-array-isarray-path-path","errorCode":null,"errorMessage":"Can't resolve member '${Array.isArray(path) ? path.join('.') : path}'","messagePattern":"Can't resolve member '(.+?)'","errorType":"validation","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/cubejs-schema-compiler/src/compiler/CubeEvaluator.ts","lineNumber":1067,"sourceCode":"    const cubeAndName = Array.isArray(path) ? path : path.split('.');\n    const symbol = this.evaluatedCubes[cubeAndName[0]]?.[type]?.[cubeAndName[1]];\n    return symbol !== undefined;\n  }\n\n  public byPathAnyType(path: string | string[]) {\n    if (this.isInstanceOfType('measures', path)) {\n      return this.byPath('measures', path);\n    }\n\n    if (this.isInstanceOfType('dimensions', path)) {\n      return this.byPath('dimensions', path);\n    }\n\n    if (this.isInstanceOfType('segments', path)) {\n      return this.byPath('segments', path);\n    }\n\n    throw new UserError(`Can't resolve member '${Array.isArray(path) ? path.join('.') : path}'`);\n  }\n\n  public byPath<T extends 'measures' | 'dimensions' | 'segments' | 'preAggregations'>(type: T, path: string | string[]): EvaluatedCube[T][string] {\n    if (!type) {\n      throw new Error(`Type can't be undefined for '${path}'`);\n    }\n\n    if (!path) {\n      throw new Error('Path can\\'t be undefined');\n    }\n\n    const cubeAndName = Array.isArray(path) ? path : path.split('.');\n    const cube = this.evaluatedCubes[cubeAndName[0]];\n    if (cube === undefined) {\n      throw new UserError(`Cube '${cubeAndName[0]}' not found for path '${path}'`);\n    }\n\n    const typeMembers = cube[type];","sourceCodeStart":1049,"sourceCodeEnd":1085,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-schema-compiler/src/compiler/CubeEvaluator.ts#L1049-L1085","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nquery.measures = ['Orders.notARealMeasure'];\n// after\nquery.measures = ['Orders.totalAmount'];","handlingStrategy":"try-catch","validationCode":"const { cubeEvaluator } = compilerApi;\nconst resolved = ['measures','dimensions','segments'].find(t => cubeEvaluator.isInstanceOfType(t, path));\nif (!resolved) throw new Error(`'${path}' is not a measure, dimension or segment`);","typeGuard":null,"tryCatchPattern":"try { return evaluator.resolveMember(path); } catch (e) { if (e.message.startsWith(\"Can't resolve member\")) { /* inspect cube members for a close match */ } throw e; }","preventionTips":["Regenerate client schemas after model changes","Check public:/security visibility when members vanish","Validate measures/dimensions/segments lists against the compiled cube before querying"],"tags":["member","resolution","validation"],"backgroundTag":"member-not-found","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}