TanStack

T

TanStack

TanStack is a community of passionate software engineers striving for high-quality, open-source software for web devs

Join

react-query-questions

solid-query-questions

table-questions

virtual-questions

router-questions

react-charts-questions

ranger-questions

vue-query-questions

svelte-query-questions

bling-questions

form-questions

angular-query-questions

start-questions

db-questions

start-showcase

router-showcase

๐Ÿ“ฃ-announcements

extended-salmon
extended-salmon10/30/2025

Custom Worker for Cloudflare Workers

Is anyone aware if there is a way to access the worker code with the Tan Stack Start integration? e.g., to handle cron as part of the same worker, similar to OpenNext's Custom Worker? https://opennext.js.org/cloudflare/howtos/custom-worker
fair-rose
fair-rose10/29/2025

Getting a warning during build with TanStack Start

Hey everyone! ๐Ÿ‘‹ I've been using TanStack Start in some of my personal web apps without any major issues โ€” it's been working great so far! However, I keep getting a warning during the build process. Has anyone else run into this or knows what might be causing it? Thanks in advance! ๐Ÿ™...
No description
quickest-silver
quickest-silver10/29/2025

workers runtime cancelling request with cloudflare/vite-plugin

9:47:18 PM [vite] Internal server error: The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/ at async ProxyServer.fetch (file:///home/akshat/Documents/git/commander/node_modules/.pnpm/miniflare@4.20251011.1/node_modules/miniflare/src/workers/core/proxy.worker.ts:174:11) I am getting this error when i run the dev script, even if i don't use the cloudflare plugin at dev mode, the prod build also fails sometime with the same error. I want to migrate to cloudflare, earlier i was using nitroV2Plugin and deploying to vercel...
generous-apricot
generous-apricot10/29/2025

how to upload file in start

when i try uploading file to server i am getting the following error
Seroval caught an error during the parsing process. Error The value [object File] of type "object" cannot be parsed/serialized. There are few workarounds for this problem: - Transform the value in a way that it can be serialized. - If the reference is present on multiple runtimes (isomorphic), you can use the Reference API to map the references. - For more information, please check the "cause" property of this error. - If you believe this is an error in Seroval, please submit an issue at https://github.com/lxsmnsyc/seroval/issues/new
am i doing this correct, i tried searching in docs about how i am suppose to upload file but could not find anything...
fair-rose
fair-rose10/29/2025

client-side cookie helper?

haven't seen anywhere in docs or other discussions but why are the cookie helpers (getCookie, setCookie) only available on the server side? Why wasn't a client side helper exposed? I think digging through some of the code that it's using js-cookie lib which can definitely be used on the frontend. So real only option now is for me to reinstall that package as well in user land....
extended-salmon
extended-salmon10/29/2025

createFileRoute() doesn't pass context from global middleware -- FIXED

EDIT: I figured out this issue is fixed in a commit a few days ago: https://github.com/TanStack/router/commit/41cc7e19ef6f40538cd621d54ca7a478e301a703 I have a global middleware that adds a session to context. It's included like this: ```...
fair-rose
fair-rose10/28/2025

server route GET handler not triggered when `Link`ed

I noticed that when navigating to a server route with a GET handler via <Link to="/some-route">Test</Link>. Is there a way to make this work? a full page refresh triggers it but not navigating to it via Link?
extended-salmon
extended-salmon10/28/2025

Time spent on reloading

Hello, i'm currently discovering tanstack, and i was wondering about something. First of all, here is the git repo : https://github.com/HussonAxel/pokemon-living-dex and the link https://pokemon-living-dex.netlify.app/ and the most significant thing is where i'm trying to reload the following : https://pokemon-living-dex.netlify.app/abilities...
environmental-rose
environmental-rose10/28/2025

Uncaught (in promise) TypeError: Failed to fetch dynamically imported module

got this error in browser console after a reployment on docker with srvx.
No description
secure-lavender
secure-lavender10/28/2025

Anyone had any luck setting up Posthog with error tracking?

Hey folks, I've been struggling with setting up Posthog in my Tanstack Start app. I've followed their official React docs but I can't get the error tracking to work. I've initialized the <PosthogProvider /> inside __root.tsx and wrapped my RootDocument with it. Seems to me that it would make sense to capture errors in the defaultOnCatch handler inside createTanStackRouter like so:...
eastern-cyan
eastern-cyan10/28/2025

CSS flickering only after docker build

When I build and deploy the app via github actions, a new .css file is brought in and 404s. This is also causing unstyled content appearing on the website. Site: https://ui.doras.to/ Repo: https://github.com/dorasto/ui ...
equal-aqua
equal-aqua10/28/2025

What is the best way to fetch deferred data for the content and meta?

Currently it seems like the best option to set/update meta tags is to fetch data in the router loader, return the data and in meta use the loader data. But the issue with this approach is that loader block page render, despite that pendingComponent is set. I've tried to fetch data from the component itself with the suspense and it seemed to work fine render wasn't blocked but updating meta from the component didn't seem to be right way to do that. Compared to next.js generateMetadata doesn't block page render and allows to stream the page. Is there any good way to solve this issue, or maybe any plans this to be improved? I think currently this is one of the most critical things should be solved to be able fully migrate from next.js....
fascinating-indigo
fascinating-indigo10/28/2025

Deploying to Cloudflare issues

Hi everyone! I recently started looking into tanstack start and wanted to deploy my first project to cloudflare workers. But I'm having some issues with building the project. Here's my vite config: `import { defineConfig } from "vite"; import tsconfigPaths from "vite-tsconfig-paths"; import { tanstackStart } from "@tanstack/react-start/plugin/vite"; import tailwindcss from "@tailwindcss/vite";...
No description
other-emerald
other-emerald10/27/2025

Copilot Route File Generation

Hello, I just had a quick question re: AI editors creating route files. I tried searching around for existing questions like this but didn't seem to find anything. I'm specifically using Copilot (with GPT-5-Codex-Mini (Preview)), with instruction files tanstack-start-shadcn-tailwind.instructions.md (from awesome-copilot) and tanstack-start-cookbook.instructions.md (from tanstack-start-cookbook, shout out jherr). When Copilot creates a new route file, its contents seem to always conflict with...
harsh-harlequin
harsh-harlequin10/27/2025

ยซ The connection was closed ยป error with bun hosting

Hey, so I'm using the bun server hosting method just as pointed out in the docs, use the exact same file and I have one app that works and is hosted using that script. But, when trying to host my other app (which is fairly complex), locally it always works. But when hosting it on coolify (same build / start commands as on my machine, same node version too) I don't know at all why this error happens and I'm simply seeking for help here because I couldn't get any information on this. I tried plenty of things. Here's the error I get : ...
extended-salmon
extended-salmon10/27/2025

createFileRoute() and createServerFn() loader type error with Vercel AI-SDK.

I get a type error in a createFileRoute() or createServerFn() loader when returning AI SDK UIMessage types. The problem is UIMessage has unknowns deeply embedded in the type structure that can't be controlled from the outside ('dynamic-tool' message parts, in particular). I realize this is because you don't know if "unknown" will be serializable. But in a case like this, I can't control the type, and we know it will be serializable because that's the purpose of AI-SDK's UIMessage. What's the best way to work around this case?...
correct-apricot
correct-apricot10/26/2025

Type 'Promise<void>' is not assignable to type 'never'

getting these weird errors after updating all start/tanstack packages ``` Type '() => Promise<{ readonly dehydratedState: DehydratedState; } | undefined>' is not assignable to type '((ctx: LoaderFnContext<Register, any, "root", {}, {}, MyRouterContext, AnyContext, AnyContext, unknown, undefined>) => Promise<...>) | ((ctx: LoaderFnContext<...>) => Promise<...>) | undefined'. Type '() => Promise<{ readonly dehydratedState: DehydratedState; } | undefined>' is not assignable to type '(ctx: LoaderFnContext<Register, any, "root", {}, {}, MyRouterContext, AnyContext, AnyContext, unknown, undefined>) => Promise<...>'....
xenial-black
xenial-black10/26/2025

Is the @tanstack/react-start sentry integration broken?

when i run the tanstack-start cli and select sentry integration, src/app/global-middleware.ts refers to registerGlobalMiddleware, which does not exist in @tanstack/react-start.
No description
other-emerald
other-emerald10/26/2025

serverContext is empty

i have a very simple setup in src/start.ts: ```ts export const startInstance = createStart(() => { return { requestMiddleware: [...
No description
protestant-coral
protestant-coral10/25/2025

Naming server functions for logs

Is it possible to set a name for a server function? For example I see this in my logs: /_serverFn/35b9306603fe2ea5a6a884ff22be58cf81e52afb4d4ab0edfed5ac694d6c3b52 I understand obfuscation is preferable to some, but personally I'd like to be able to see what server functions are getting called in my logs so I can keep track of when things are getting called more easily...