Search Docs

Search through documentation...

OpenStatus Logo

Debugging

Type errors right after install

shadcn add finished, but tsc or next build fails inside the files it just wrote, with errors like these:

src/components/data-table/data-table-toolbar.tsx
  Type '{ children: Element[]; delayDuration: number; }' is not assignable to type 'IntrinsicAttributes & Props<unknown>'.
  Property 'delayDuration' does not exist on type 'TooltipProviderProps'.
 
src/components/data-table/data-table-sheet/data-table-sheet-details.tsx
  Property 'render' does not exist on type 'DialogCloseProps'.
 
src/components/data-table/data-table-filter-controls.tsx
  Property 'type' does not exist on type 'AccordionProps'.
 
src/components/data-table/data-table-infinite/hover-card-timestamp.tsx
  Property 'openDelay' does not exist on type 'HoverCardProps'.
 
src/lib/table-schema/generators/columns.tsx
  Type 'boolean | "indeterminate"' is not assignable to type 'boolean | undefined'.

With npm, it can fail one step earlier — shadcn add itself exits during "Installing dependencies":

npm error ERESOLVE could not resolve
npm error While resolving: @base-ui/react@1.8.0
npm error Found: date-fns@3.6.0
npm error Could not resolve dependency:
npm error peerOptional date-fns@"^4.0.0" from @base-ui/react@1.8.0

Cause. A copy of the blocks from before they supported Base UI, installed into a Base UI project. Since shadcn v4, npx shadcn@latest init -d defaults to the base-nova preset, which installs Base UI primitives (@base-ui/react) whose props differ from Radix — delay instead of delayDuration, render instead of asChild, no type on Accordion. The blocks ship no ui/ files of their own, so the CLI resolves tooltip, dialog and the rest from whatever library your components.json names, and the older blocks assumed Radix. (The npm variant is the same mismatch one layer down: those blocks pinned date-fns v3, and @base-ui/react asks for v4 as a peer.)

Fix. Re-add the blocks. The current ones install on either library:

npx shadcn@latest add @data-table-filters/data-table @data-table-filters/data-table-schema --overwrite

--overwrite rewrites the block files — if you edited them, re-apply your changes afterwards.

How the blocks manage it: the shadcn CLI rewrites asChild into render on the way into a Base UI project, the few props it doesn't translate are spread from components/data-table/ui-compat.ts, and accordion ships with the block rather than resolving from your ui/ (as sheet and sortable already did), because the two libraries disagree there on more than a prop name. Both paths are installed and typechecked in CI on every change, so neither can rot.

Performance

We use react-scan for performance debugging:

# .env.local
NEXT_PUBLIC_REACT_SCAN=true

TanStack Query devtools appear automatically in development. For table debug logs:

NEXT_PUBLIC_TABLE_DEBUG=true

Try the debugging tools on the /infinite demo — it has all three enabled in development.