T
TanStack7d ago
fascinating-indigo

getHeader is not a function when using Tanstack Form with Tanstack Start RC

Repro: https://stackblitz.com/edit/tanstack-form-tdx1ytd7?file=vite.config.ts Unfortunately a separate already reported error prevents the repro from running in stack blitz but can still download if needed.
Server Fn Error!

TypeError: (0 , __vite_ssr_import_1__.getHeader) is not a function
at eval (node_modules/@tanstack/react-form/src/start/createServerValidate.tsx:102:21)
at getFormData (src/utils/form.tsx:24:33)
at server (node_modules/@tanstack/start-client-core/src/createServerFn.ts:728:38)
at applyMiddleware (node_modules/@tanstack/start-client-core/src/createServerFn.ts:643:10)
at next (node_modules/@tanstack/start-client-core/src/createServerFn.ts:211:14)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
Server Fn Error!

TypeError: (0 , __vite_ssr_import_1__.getHeader) is not a function
at eval (node_modules/@tanstack/react-form/src/start/createServerValidate.tsx:102:21)
at getFormData (src/utils/form.tsx:24:33)
at server (node_modules/@tanstack/start-client-core/src/createServerFn.ts:728:38)
at applyMiddleware (node_modules/@tanstack/start-client-core/src/createServerFn.ts:643:10)
at next (node_modules/@tanstack/start-client-core/src/createServerFn.ts:211:14)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
3 Replies
fascinating-indigo
fascinating-indigo7d ago
As a side note, TanStack Start doesn't work in stack blitz. So all the reproductions/examples in the docs use CodeSandbox instead.
correct-apricot
correct-apricot7d ago
yeah, it’s a known issue. https://github.com/TanStack/form/pull/1771 here‘s the PR for it
GitHub
feat: update start to rc by Balastrong · Pull Request #1771 · Tan...
🎯 Changes Attempt to update start to RC (for some reason node and typescript are having fun and the build is not building) ✅ Checklist I have followed the steps in the Contributing guide. I have...
fascinating-indigo
fascinating-indigoOP7d ago
Aw sweet I'll pull that in for now. Thanks

Did you find this page helpful?