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-salmon6/21/2025

routeTree.gen.ts is locked but it has merge conflicts

Hey what is the best way to deal with such situations?
No description
deep-jade
deep-jade6/21/2025

Can't redirect from apex domain to www because global middleware doesn't work / Cloudflare workers

I'm trying to use global middleware to redirect from the apex domain to www and can't because the global middleware isn't being registered. Here's what I've tried: 1. Calling the registerGlobalMiddleware fn in the root of the project (app/global-middleware.ts). This is what the docs say to do....
harsh-harlequin
harsh-harlequin6/21/2025

TypeError: import_node_async_hooks.AsyncLocalStorage is not a constructor

Using latest of start ``` "@tanstack/react-form": "^1.12.3", "@tanstack/react-query": "^5.80.10",...
variable-lime
variable-lime6/20/2025

Test deploy of v1.121.30 to AWS Amplify gives error "Only HTML requests are supported here"

In before load. Fetching session data gives the above error from the serverFn ``` beforeLoad: async ({ search }) => { const serverSession = await fetchServerSessionFn({...
No description
genetic-orange
genetic-orange6/20/2025

createServerFileRoute with different middleware for GET and POST

I am trying to create an app with an API that uses a different middleware for GET and POST. I am using the example code from the docs. My code looks like this ```typrscript export const ServerRoute = createServerFileRoute(...
extended-salmon
extended-salmon6/20/2025

Vercel build error

Does anyone know why vercel gives this build error? I am using the version 1.121.29 and everything works fine locally...
No description
like-gold
like-gold6/20/2025

WIll there be any breaking change in TanStack Start v1?

I've been working with TanStack Start on my personal projects for sometime now, and it's been such a delight to work with. However, I have a project I want to work on for a client, and I'm still torn between using Nextjs or TanStack Start. Start because the DX is so amazing, and it's so nice to work with. Nextjs because... well, it's not in beta. I just want to know if there'll be any breaking change between now and when v1 drops.
extended-salmon
extended-salmon6/19/2025

SPA mode doesn't generate _shell.html

Hey all, I've enabled SPA mode in my app, but no _shell.html is appearing in the output when I run build. I'm using the aws-lambda preset. Does anyone know why this might be? The app still appears to build, but the output structure looks identical to before enabling SPA mode, so I'm not convinced this is working....
extended-salmon
extended-salmon6/19/2025

How to get stracktraces when errors occur?

I'm using Sentry, but it doesnt support sending stacktraces with Tanstack start. This is not doable with production apps. What is currently the best way to monitor, trace and debug your app in production?
variable-lime
variable-lime6/19/2025

Disabling SSR

If I disable SSR in TanStack Start, can I safely access browser APIs like localStorage inside a route’s beforeLoad() function? Or does beforeLoad() ever run on the server even when SSR is off? ``` export const Route = createFileRoute('/_dashboard/_company')({ component: CompanyLayout,...
exotic-emerald
exotic-emerald6/19/2025

Getting error deploying Cloudflare worker

I am using tanstack start version 1.121.26 Vite plugin here is my vite.conf.ts ```ts import { tanstackStart } from '@tanstack/react-start/plugin/vite'...
foreign-sapphire
foreign-sapphire6/19/2025

Tanstack start missing index.html for `static` build

We have just upgrade to use tanstack vite plugin, but for target static, it build to _shell.html instead of index.html, we can workaround by running a script but hope it can be fixed completely This is our config ``` import { defineConfig } from 'vite' import { tanstackStart } from '@tanstack/react-start/plugin/vite'...
No description
extended-salmon
extended-salmon6/19/2025

Tanstack start performance

I had a general question Is tanstack start currently slower on vercel than nextjs on vercel? I am using everything supabase and postgres on both end but seeing some load performance drop when using SSR...
afraid-scarlet
afraid-scarlet6/18/2025

How to protect server functions?

Hi! I'm using the start-clerk-basic example (https://github.com/TanStack/router/tree/main/examples/react/start-clerk-basic) to start a project and I can see how we can require authentication on the front-end, but if I try to call the endpoint generated by the server function on Postman, it works even without login. What would be the best practice to do this with a global middleware? Any examples?
variable-lime
variable-lime6/17/2025

How does the useSession hook in TanStack Start works

I saw it one of the examples and would like understand how it works. There's no docx for it.
import { useSession } from '@tanstack/react-start/server'
import { useSession } from '@tanstack/react-start/server'
...
like-gold
like-gold6/17/2025

graceful shutdown?

Any recommended ways to make sure servers are shut down gracefully? Are there explicit expectations about how requests are handled when the process receives sigint or sigterm?
firm-tan
firm-tan6/17/2025

The split value for the virtual route

Just start using tanstack start and got an error ``` [vite] Internal server error: The split value for the virtual route "/nodemodules/.pnpm/vite@6.0.11@types+node@22.15.17_jiti@2.4.2_sass@1.78.0_terser@5.37.0_tsx@4.20.3_yaml@2.8.0/node_modules/vite/dist/client/client.mjs" was not found. Plugin: tanstack-router:code-splitter:compile-virtual-file...
flat-fuchsia
flat-fuchsia6/17/2025

Cannot render client side code

After migrating to devinxi I am having a problem where everything is being serverside rendered. So no console.logs, button interactions etc are working. As the migration guide suggested, i deleted both server.tsx and client.tsx files...
ugly-tan
ugly-tan6/17/2025

routerWithQueryClient: Invalidating queryClient cache

I'm running into an issue with client-side cache invalidation when using routerWithQueryClient. Problem: I have a loader that prefetches data on the server: ...