{"record":{"id":"6a15c14c6dc183b3","repo":"cube-js/cube","slug":"cubename-refproperty-refproperty","errorCode":null,"errorMessage":"${cubeName}${refProperty ? `.${refProperty}` : ''}.${propertyName} cannot be resolved. There's no such member or cube.","messagePattern":"(.+?)(.+?)` : ''\\}\\.(.+?) cannot be resolved\\. There's no such member or cube\\.","errorType":"exception","errorClass":"UserError","httpStatus":null,"severity":"error","filePath":"packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts","lineNumber":1517,"sourceCode":"          self.resolveGranularity([cubeName, refProperty, 'granularities', propertyName], cube)\n        ) {\n          return {\n            toString: () => this.withSymbolsCallContext(\n              () => sqlResolveFn(cube[refProperty], cubeName, refProperty, propertyName),\n              { ...this.resolveSymbolsCallContext },\n            ),\n          };\n        }\n        if (cube[propertyName as string]) {\n          // We put cubeName at the beginning of the cubeReferenceProxy(), no need to add it again\n          // so let's cut it off from joinHints\n          return this.cubeReferenceProxy(cubeName, joinHints?.slice(0, -1), propertyName);\n        }\n        if (self.symbols[propertyName]) {\n          return this.cubeReferenceProxy(propertyName, joinHints);\n        }\n        if (typeof propertyName === 'string') {\n          throw new UserError(`${cubeName}${refProperty ? `.${refProperty}` : ''}.${propertyName} cannot be resolved. There's no such member or cube.`);\n        }\n        return undefined;\n      }\n    });\n  }\n\n  /**\n   * Tries to resolve Granularity object.\n   * For predefined granularity it constructs it on the fly.\n   * @param {string|string[]} path\n   * @param [refCube] Optional cube object to operate on\n   */\n  public resolveGranularity(path: string | string[], refCube?: any) {\n    const [cubeName, dimName, gr, granName] = Array.isArray(path) ? path : path.split('.');\n    const cube = refCube || this.symbols[cubeName];\n\n    // Calendar cubes time dimensions may define custom sql for predefined granularities,\n    // so we need to check if such granularity exists in cube definition.","sourceCodeStart":1499,"sourceCodeEnd":1535,"githubUrl":"https://github.com/cube-js/cube/blob/7d981676b36392fec34088b9afab6bdcad40207c/packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts#L1499-L1535","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\nmeasure: { type: 'count', sql: '\\${Orders.customr_id}' }\n// after\nmeasure: { type: 'count', sql: '\\${Orders.customer_id}' }","handlingStrategy":"validation","validationCode":"// before querying/compiling, verify member exists in meta\nconst meta = await cubeApi.meta();\nconst exists = meta.cubes.some(c => c.name === 'Orders' &&\n  [...c.measures, ...c.dimensions].some(m => m.name === 'Orders.customerId'));\nif (!exists) throw new Error('Orders.customerId does not exist');","typeGuard":"function memberExists(meta, cubeName, member) {\n  const c = meta.cubes.find(c => c.name === cubeName);\n  return !!c && [...c.measures, ...c.dimensions, ...(c.segments || [])].some(m => m.name === `${cubeName}.${member}`);\n}","tryCatchPattern":"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; }","preventionTips":["Validate queries against /meta before execution","Search for old member names when renaming","Add joins for every cube you reference from a query"],"tags":["schema-compiler","unresolved-reference","data-modeling"],"backgroundTag":"unresolved-member-reference","analyzedSha":"7d981676b36392fec34088b9afab6bdcad40207c","analyzedAt":"2026-09-02T03:45:10.400Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}