TanStack/table · warning

aggregationFn '${name}' (auto) for column '${column.id}' is

Error message

aggregationFn '${name}' (auto) for column '${column.id}' is not registered

What it means

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.

Source

Thrown at packages/table-core/src/features/row-aggregation/rowAggregationFeature.utils.ts:202

  return undefined
}

/** Resolves the `sum` or `extent` definition inferred from the first core row. */
export function column_getAutoAggregationFn<
  TFeatures extends TableFeatures,
  TData extends RowData,
  TValue extends CellData = CellData,
>(column: Column_Internal<TFeatures, TData, TValue>) {
  const value = column.table.getCoreRowModel().flatRows[0]?.getValue(column.id)

  const name = getAutoAggregationFnName(value)
  if (!name) return undefined

  const aggregationFn = column.table._rowModelFns.aggregationFns?.[name]

  if (!aggregationFn) {
    warn(
      `aggregationFn '${name}' (auto) for column '${column.id}' is not registered`,
    )
  }

  return aggregationFn
}

function resolveAggregationFn<
  TFeatures extends TableFeatures,
  TData extends RowData,
>(
  column: Column_Internal<TFeatures, TData, any>,
  ref: AggregationFnRef<TFeatures, TData, any, any>,
): AggregationFnDef<TFeatures, TData, any, any> | undefined {
  if (isAggregationFnDef(ref)) return ref as any
  if (ref === 'auto') return column_getAutoAggregationFn(column)

  const aggregationFn =

View on GitHub (pinned to d01c01bedb)

Solutions

  1. Ensure the aggregationFns registry includes the built-ins: `{ ...builtInAggregationFns, ...yourCustomFns }`.
  2. Verify the row-model feature that provides `aggregationFns` (aggregation feature) is enabled in the table's feature set.
  3. Inspect `table._rowModelFns.aggregationFns` at runtime and add the missing `sum`/`extent` key.
  4. Pass an explicit function object instead of 'auto': `aggregationFn: { aggregate: mySumFn }`, bypassing registry lookup.
  5. Check that the first core row actually has the expected data type; a corrupted first row can cause an unintended auto name.

Example fix

// before
const table = useTable({ aggregationFns: { mean: meanFn } }) // built-ins dropped

// after
import { aggregationFns as builtIns } from '@tanstack/table-core'
const table = useTable({ aggregationFns: { ...builtIns, mean: meanFn } })
Defensive patterns

Strategy: validation

Validate before calling

const BUILT_INS = ['sum', 'extent'] as const
function assertAutoAggregationsRegistered(aggregationFns: Record<string, unknown> | undefined) {
  for (const name of BUILT_INS) {
    if (!aggregationFns || !(name in aggregationFns)) {
      throw new Error(`auto aggregation '${name}' missing from aggregationFns registry`)
    }
  }
}
assertAutoAggregationsRegistered(table._rowModelFns.aggregationFns)

Type guard

function supportsAutoAggregation(
  fns: Record<string, unknown> | undefined,
): fns is Record<string, unknown> & { sum: unknown; extent: unknown } {
  return !!fns && 'sum' in fns && 'extent' in fns
}

Try / catch

try {
  const value = column.getAggregationValue()
  if (value === undefined && column.columnDef.aggregationFn === 'auto') {
    console.warn(`auto aggregation unresolved for column '${column.id}'`)
  }
} catch (e) {
  console.error('auto aggregation failed', e)
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of TanStack/table@d01c01bedb (2026-08-28). Data as JSON: /api/errors/ee9782aadac4298f. Report an issue: GitHub.