{"record":{"id":"c934746b35aa155c","repo":"TanStack/table","slug":"message","errorCode":null,"errorMessage":"${message}","messagePattern":"\\$\\{message\\}","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"packages/table-core/src/features/row-aggregation/rowAggregationFeature.utils.ts","lineNumber":52,"sourceCode":"\nfunction isAggregationFnDef(value: unknown): value is AggregationFnDef {\n  return !!value && typeof value === 'object' && 'aggregate' in value\n}\n\nfunction isAggregationFnDescriptor(\n  value: unknown,\n): value is AggregationFnDescriptor<any, any> {\n  return (\n    !!value &&\n    typeof value === 'object' &&\n    'id' in value &&\n    'aggregationFn' in value\n  )\n}\n\nfunction warn(message: string) {\n  if (process.env.NODE_ENV === 'development') {\n    console.warn(message)\n  }\n}\n\nfunction resolveMaxAggregationDepth(maxDepth: number | undefined) {\n  return maxDepth === undefined || Number.isNaN(maxDepth)\n    ? 0\n    : Math.max(0, Math.floor(maxDepth))\n}\n\nfunction collectNormalizedAggregationRow<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  row: Row<TFeatures, TData>,\n  depth: number,\n  maxDepth: number,\n  seen: Set<string>,\n  result: Array<Row<TFeatures, TData>>,","sourceCodeStart":34,"sourceCodeEnd":70,"githubUrl":"https://github.com/TanStack/table/blob/d01c01bedbab0ff6c2641f18b2fc9a11545d9bf6/packages/table-core/src/features/row-aggregation/rowAggregationFeature.utils.ts#L34-L70","documentation":"This is the internal `warn(message)` helper in rowAggregationFeature.utils.ts: it prefixes `console.warn` with the given message, but only when `process.env.NODE_ENV === 'development'`. It is the shared warning sink for all row-aggregation misconfigurations (unregistered/duplicate aggregation fns, missing stable ids). Seeing `${message}` means some aggregation option did not fully resolve, and the actual text comes from whichever caller invoked `warn`.","triggerScenarios":"Any code path in the aggregation feature calling `warn(...)` during dev-mode rendering: resolving a column's `aggregationFn` option (string lookup failing), auto-detecting an aggregation for numeric/Date columns, or iterating an array-valued `aggregationFn` option with missing or duplicate ids. All run via `column_getAggregationFns` / `column_getAutoAggregationFn` / `resolveAggregationFn` when the aggregation row model or `getAggregationValue` is evaluated.","commonSituations":"Development builds only (warning stripped in production, so teams miss it until QA on staging); first render of a grouped/aggregated table; adding a new aggregated column with a hand-written descriptor missing `id`.","solutions":["Read the full warning text — it names the column id and the specific problem (not registered, duplicated, or needs a stable id).","If it says 'is not registered', add the referenced key to the `aggregationFns` registry or pass the function object directly.","If it says 'needs a stable id', use a string ref or an object descriptor `{ id, aggregationFn }` in the array option.","If it says 'duplicated', give each entry in the aggregationFn array a unique id.","Verify NODE_ENV: this warning only appears in development, so do not rely on it in production builds."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate aggregation config before creating the table\nfunction validateAggregationOption(option: unknown, fns: Record<string, unknown>) {\n  if (option == null) return\n  if (Array.isArray(option)) {\n    option.forEach((item, i) => {\n      const id = typeof item === 'string' ? item : (item as any)?.id\n      if (id === undefined) throw new Error(`aggregationFn[${i}] needs an id`)\n    })\n  } else if (typeof option === 'string' && option !== 'auto' && !(option in fns)) {\n    throw new Error(`aggregationFn '${option}' not registered`)\n  }\n}","typeGuard":"function hasStableId(\n  item: unknown,\n): item is { id: string; aggregationFn: unknown } {\n  return (\n    !!item &&\n    typeof item === 'object' &&\n    typeof (item as any).id === 'string'\n  )\n}","tryCatchPattern":"try {\n  const entries = column.getAggregationFns()\n  const broken = entries.filter((e) => e.aggregationFn === undefined)\n  if (broken.length) console.warn(`${broken.length} aggregation entries unresolved`)\n} catch (e) {\n  console.error('aggregation resolution failed', e)\n}","preventionTips":["Treat all dev console.warn output from the aggregation feature as build blockers via a no-console lint rule.","Validate aggregation options in a unit test that mounts the table with your real config.","Only use string refs that exist in your aggregationFns registry; prefer function objects."],"tags":["aggregation","dev-warning","console-warn","configuration"],"backgroundTag":"dev-mode-console-warning","analyzedSha":"d01c01bedbab0ff6c2641f18b2fc9a11545d9bf6","analyzedAt":"2026-08-28T21:52:44.679Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}