-
Notifications
You must be signed in to change notification settings - Fork 283
Labels
Description
The tanstack-db-web-starter template fails to run due to a better-auth compatibility issue with TanStack Start.
The error
TypeError: Cannot read properties of undefined (reading 'body')
at get body [as body] (node:internal/deps/undici/undici:9946:29)
at getBody ([email protected]/src/utils.ts:7:15)
at processRequest ([email protected]/src/router.ts:191:14)
Steps to reproduce
npx gitpick electric-sql/electric/tree/main/examples/tanstack-db-web-starter my-tanstack-db-project
cd my-tanstack-db-project
pnpm install
pnpm devTry and login. Auth fails with the above error.
Environment
- Node.js: 20.19.0 (also fails on 22.12.0)
- better-auth: 1.4.2
- better-call: 1.1.0
- TanStack Start: 1.139.6
- Vite: 7.2.4
Attempted fix
Adding the tanstackStartCookies() plugin to src/lib/auth.ts (as recommended in better-auth docs) does not resolve the issue.
Impact
This blocks the @electric-sql/start quickstart package from being deployed, as generated apps fail immediately on startup.