{"record":{"id":"ee9782aadac4298f","repo":"TanStack/table","slug":"aggregationfn-name-auto-for-column-colum","errorCode":null,"errorMessage":"aggregationFn '${name}' (auto) for column '${column.id}' is not registered","messagePattern":"aggregationFn '(.+?)' \\(auto\\) for column '(.+?)' is not registered","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/table-core/src/features/row-aggregation/rowAggregationFeature.utils.ts","lineNumber":202,"sourceCode":"\n  return undefined\n}\n\n/** Resolves the `sum` or `extent` definition inferred from the first core row. */\nexport function column_getAutoAggregationFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n  TValue extends CellData = CellData,\n>(column: Column_Internal<TFeatures, TData, TValue>) {\n  const value = column.table.getCoreRowModel().flatRows[0]?.getValue(column.id)\n\n  const name = getAutoAggregationFnName(value)\n  if (!name) return undefined\n\n  const aggregationFn = column.table._rowModelFns.aggregationFns?.[name]\n\n  if (!aggregationFn) {\n    warn(\n      `aggregationFn '${name}' (auto) for column '${column.id}' is not registered`,\n    )\n  }\n\n  return aggregationFn\n}\n\nfunction resolveAggregationFn<\n  TFeatures extends TableFeatures,\n  TData extends RowData,\n>(\n  column: Column_Internal<TFeatures, TData, any>,\n  ref: AggregationFnRef<TFeatures, TData, any, any>,\n): AggregationFnDef<TFeatures, TData, any, any> | undefined {\n  if (isAggregationFnDef(ref)) return ref as any\n  if (ref === 'auto') return column_getAutoAggregationFn(column)\n\n  const aggregationFn =","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/TanStack/table/blob/d01c01bedbab0ff6c2641f18b2fc9a11545d9bf6/packages/table-core/src/features/row-aggregation/rowAggregationFeature.utils.ts#L184-L220","documentation":"When a column uses `aggregationFn: 'auto'` (or omits it so auto-resolution kicks in), the library infers `sum` for numeric first-row values or `extent` for Date values, then looks that name up in `table._rowModelFns.aggregationFns`. This warning fires when the inferred name is absent from the registry, so the column aggregates to `undefined`. It indicates the aggregationFns registry was not populated with the built-in/expected functions.","triggerScenarios":"A column whose first core row value is a number or valid Date, resolved with `aggregationFn: 'auto'`, while `table._rowModelFns.aggregationFns` lacks the `sum` (or `extent`) entry — e.g. the row-model feature providing `aggregationFns` was not included, a custom registry object was passed without built-ins, or the registry was spread/overridden and dropped the defaults.","commonSituations":"Building a custom table feature set and forgetting to include the aggregation feature's built-in fns; spreading `{...customFns}` instead of `{...builtInFns, ...customFns}`; grouped tables where numeric columns show empty aggregate cells in dev.","solutions":["Ensure the aggregationFns registry includes the built-ins: `{ ...builtInAggregationFns, ...yourCustomFns }`.","Verify the row-model feature that provides `aggregationFns` (aggregation feature) is enabled in the table's feature set.","Inspect `table._rowModelFns.aggregationFns` at runtime and add the missing `sum`/`extent` key.","Pass an explicit function object instead of 'auto': `aggregationFn: { aggregate: mySumFn }`, bypassing registry lookup.","Check that the first core row actually has the expected data type; a corrupted first row can cause an unintended auto name."],"exampleFix":"// before\nconst table = useTable({ aggregationFns: { mean: meanFn } }) // built-ins dropped\n\n// after\nimport { aggregationFns as builtIns } from '@tanstack/table-core'\nconst table = useTable({ aggregationFns: { ...builtIns, mean: meanFn } })","handlingStrategy":"validation","validationCode":"const BUILT_INS = ['sum', 'extent'] as const\nfunction assertAutoAggregationsRegistered(aggregationFns: Record<string, unknown> | undefined) {\n  for (const name of BUILT_INS) {\n    if (!aggregationFns || !(name in aggregationFns)) {\n      throw new Error(`auto aggregation '${name}' missing from aggregationFns registry`)\n    }\n  }\n}\nassertAutoAggregationsRegistered(table._rowModelFns.aggregationFns)","typeGuard":"function supportsAutoAggregation(\n  fns: Record<string, unknown> | undefined,\n): fns is Record<string, unknown> & { sum: unknown; extent: unknown } {\n  return !!fns && 'sum' in fns && 'extent' in fns\n}","tryCatchPattern":"try {\n  const value = column.getAggregationValue()\n  if (value === undefined && column.columnDef.aggregationFn === 'auto') {\n    console.warn(`auto aggregation unresolved for column '${column.id}'`)\n  }\n} catch (e) {\n  console.error('auto aggregation failed', e)\n}","preventionTips":["Always spread built-in aggregationFns before your custom ones: { ...builtIns, ...custom }.","Include the aggregation row-model feature in the table feature set whenever any column uses 'auto'.","Add a startup assertion that the registry contains 'sum' and 'extent'."],"tags":["aggregation","unregistered-function","auto-detection","registry"],"backgroundTag":"unregistered-function-name","analyzedSha":"d01c01bedbab0ff6c2641f18b2fc9a11545d9bf6","analyzedAt":"2026-08-28T21:52:44.679Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}