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

flat-fuchsia
flat-fuchsia1/16/2025

error: createMiddleware must be called with a "use" property!, after updating from 1.95.7 -> 1.97.2

```6:32:35 PM [vite] Internal server error: createMiddleware must be called with a "use" property! Plugin: vite-plugin-tanstack-start-create-server-fn File: /Users/michaeldahl/Developer/Personal/dashboard/node_modules/.vinxi/cache/client/deps/chunk-5UEUQFZ2.js?v=7e4155f6 at Object.handleCreateMiddlewareCallExpression [as handleCallExpression] (file:///Users/michaeldahl/Developer/Personal/dashboard/node_modules/@tanstack/start-plugin/dist/esm/compilers.js:242:11) at file:///Users/michaeldahl/Developer/Personal/dashboard/node_modules/@tanstack/start-plugin/dist/esm/compilers.js:105:40...
vicious-gold
vicious-gold1/15/2025

Uncaught Error: Hydration failed because the initial UI does not match what was rendered on the serv

Not happens on every site loading but I am just wondering how can I debug this error? I tried removing everything from the component in __root.tsx. As long as <Script /> is here, the error can happen. I know I don't provide a reproduction here but I am just looking for guesses if any or a way to have a clearer error message? 🙏...
sensitive-blue
sensitive-blue1/14/2025

Create API route at /sitemap.xml or /manifest.json

I'm trying to figure out how to create a handler that will response to /sitemap.xml or /manifest.json The difficulties I'm running in to are: - Wanting /api routes (no root, no layout, not html content-type) at a route other than /api - Wanting to include the . in the route itself - sitemap.xml.ts maps to /sitemap/xml in Tanstack file routing...
constant-blue
constant-blue1/14/2025

Nitro tasks in tanstack start?

Did anyone investigate wether this is even possible with vinxi? https://nitro.build/guide/tasks https://github.com/nitrojs/nitro/issues/1974...
modern-teal
modern-teal1/14/2025

Page flickers on React 19 when hydration error

Hey guys, I am trying to implement a theme switcher in my tanstack start project but I have hit a bug. When I do a page refresh, with a hydration error, the entire page flickers. This bug only happens with react 19 weirdly enough. With react 18 the page does't flicker at all. This is problably a skill issue on my end, does anyone know how to fix this ? I have also attached a video that shows this bug. When I refresh with the system theme selected, the page does not flicker as there is no hydration missmatch. But if I refresh with the light / dark mode selected, the full page refreshes as there is a hydration missmatch. Would love to get any help with it 🙌 ...
modern-teal
modern-teal1/13/2025

Docker compose with tanstack start

Hey guys, I am struggling to get docker working with tanstack start in DEV mode ? I keep getting this error (See attached at the bottom). I have tried to play around with the host name but with no luck. I would love some help on this 🙌 Reproduction steps:...
No description
fascinating-indigo
fascinating-indigo1/13/2025

Shared Context with functions between Server and Client

Is it possible to share an object with functions or a class instance via Context between Server and Client? This seems to working for a queryClient through routerWithQueryClient but I guess there is some magic happening around serialization and reinstantiation on the client? The Router docs describe dependency injection as follows:
Dependency Injection...
fascinating-indigo
fascinating-indigo1/13/2025

What is the size limit of variables passed to server functions?

Been trying to upload some images via server functions and every so often hit a 413 - Request Entity Too Large error. Would this be a limitation of serverFunctions, nitro or vercel?
fair-rose
fair-rose1/11/2025

Vercel target in Nx monorepo results in 404

I have following config: ```ts import { builtinModules } from 'module' import { defineConfig } from '@tanstack/start/config' import tsConfigPaths from 'vite-tsconfig-paths'...
No description
conscious-sapphire
conscious-sapphire1/11/2025

Setting Bun server options?

How can I set the server options for the bun adapter? I need to change the idleTimeout because I have a server fn that takes longer than 10s to run which keeps timing out. I tracked this down to Nitro but can't find any documentation or examples there of how to actually set options
useful-bronze
useful-bronze1/10/2025

Is it possible to sort data in each group?

Hi all, is it possible to sort data without changing the order of grouping data? In the video, I group data by last name. If I sort by age, the order of grouped lastname is changed. Can I prevent that? Or is there any way to implement the sorting for each group only?
vicious-gold
vicious-gold1/10/2025

`Header` in __root reset on each navigation?

I have this floating bottom bar that I place in __root file. Its theme changes dynamically based on an IntersectionObserver. Its initial theme is dark. But the state always re-init when I change page, is that expected? As you can see in the video at the end when the bar is light and I change from Blog page to Pricing page, it flashes back to dark I thought that having a component in root (or any pathless route), when navigating, it would not repaint the components...
correct-apricot
correct-apricot1/8/2025

Is it possible to add middleware to API routes?

Hi all, is it possible to add middleware to API routes? I need to implement authentication but couldn’t find relevant documentation. Any guidance or resources would be appreciated! Thanks in advance!
conscious-sapphire
conscious-sapphire1/8/2025

Problem debugging in VSCode

Hi All I really like Tanstack Start but at the moment I don't see a path to migrating to is because the debugging just doesnt work. If I have a root component called index.tsx, I can hit a breakpoint within a server function for the first time but then subsequent breakpoints don't work. Also, when I hit a breakpoint I don't see the value of the variables, it just shows their type. Then when I continue it goes into another file called index.tsx?tsr-split which looks like transpiled code.Is this possibly because of Vinxi? Is this a known problem and do you think it will be resolved. Thanks for all the hard work...
other-emerald
other-emerald1/7/2025

I'll be the first one to ask: Any timeline for a TanStack Start RC?

Hello, I'd like to ask if there will be an RC or v1 soon?...
helpful-purple
helpful-purple1/7/2025

Would it be possible to add View-Transitions like Astro.build?

Would it be possible to add View-Transitions as Astro.build? I think they are pretty cool feature and it would be nice to have a build-in way to do the same/similar in TTS. Also I think the DX of Astro is something it could be included somehow to TTS? :tanner:
genetic-orange
genetic-orange1/7/2025

Vite config issue?

My TSS side project is working fine and I want to add in Clerk. I spun up the TSS Clerk example app and that works fine too. I've copied across the Clerk related stuff into my side project and I'm getting - ``` Error: We detected that the '@vitejs/plugin-react' was passed before '@tanstack/start-vite-plugin'. Please make sure that '@tanstack/router-vite-plugin' is passed before '@vitejs/plugin-react' and try again: e.g. ...
fair-rose
fair-rose1/7/2025

How exactly is Tanstack Start is "client side first"

I'll be giving a talk tomorrow on Tanstack Start, and why I'm upgrading my remix app to it. One of the things I'd like to talk about that I don't know how to explain on a fundemental level but can just kind of feel when I use it for now is the whole "Client Side First" principle of it Right now the best I can do is show that certain client side libraries just work out of the box with Tanstack Start that were a massive pain to get to work in Remix... - react-hot-toast - react-tooltip...
like-gold
like-gold1/6/2025

placeholderData:keepPreviousData sets undefined only . never sets data. How to keep previouse data

placeholderData: keepPreviousData, the placeholder is always undefined i tried callback with plcaeholderdata this does give anything . how to preserve the previouse data in tanstack query?
fascinating-indigo
fascinating-indigo1/4/2025

Sentry integration hot tips anyone?

Trying to integrate sentry properly into tanstack start apps.. Can get it to pick up some errors using sentry/react pkg, however using default error boundaries kinda stops the errors properly propagating to sentry, and there is no clear way to gen sourcemaps. Did add the sentry vite plugin, but looks like the sourcemap IDs aren't matching? Any pointers would be great 🙂