TanStack/table · info
${message}
Error message
${message} What it means
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`.
Source
Thrown at packages/table-core/src/features/row-aggregation/rowAggregationFeature.utils.ts:52
function isAggregationFnDef(value: unknown): value is AggregationFnDef {
return !!value && typeof value === 'object' && 'aggregate' in value
}
function isAggregationFnDescriptor(
value: unknown,
): value is AggregationFnDescriptor<any, any> {
return (
!!value &&
typeof value === 'object' &&
'id' in value &&
'aggregationFn' in value
)
}
function warn(message: string) {
if (process.env.NODE_ENV === 'development') {
console.warn(message)
}
}
function resolveMaxAggregationDepth(maxDepth: number | undefined) {
return maxDepth === undefined || Number.isNaN(maxDepth)
? 0
: Math.max(0, Math.floor(maxDepth))
}
function collectNormalizedAggregationRow<
TFeatures extends TableFeatures,
TData extends RowData,
>(
row: Row<TFeatures, TData>,
depth: number,
maxDepth: number,
seen: Set<string>,
result: Array<Row<TFeatures, TData>>,View on GitHub (pinned to d01c01bedb)
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.
Defensive patterns
Strategy: validation
Validate before calling
// Validate aggregation config before creating the table
function validateAggregationOption(option: unknown, fns: Record<string, unknown>) {
if (option == null) return
if (Array.isArray(option)) {
option.forEach((item, i) => {
const id = typeof item === 'string' ? item : (item as any)?.id
if (id === undefined) throw new Error(`aggregationFn[${i}] needs an id`)
})
} else if (typeof option === 'string' && option !== 'auto' && !(option in fns)) {
throw new Error(`aggregationFn '${option}' not registered`)
}
} Type guard
function hasStableId(
item: unknown,
): item is { id: string; aggregationFn: unknown } {
return (
!!item &&
typeof item === 'object' &&
typeof (item as any).id === 'string'
)
} Try / catch
try {
const entries = column.getAggregationFns()
const broken = entries.filter((e) => e.aggregationFn === undefined)
if (broken.length) console.warn(`${broken.length} aggregation entries unresolved`)
} catch (e) {
console.error('aggregation resolution failed', e)
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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`.
Related errors
- aggregationFn '${String(ref)}' for column '${column.id}' is
- aggregationFn at index ${i} for column '${column.id}' needs
- aggregationFn id '${id}' for column '${column.id}' is duplic
- globalFilterFn '${String(globalFilterFn)}' is not registered
- [table-worker] ${message}
AI-assisted analysis of TanStack/table@d01c01bedb (2026-08-28).
Data as JSON: /api/errors/c934746b35aa155c.
Report an issue: GitHub.