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

conscious-sapphire
conscious-sapphire4/12/2025

Can I have custom SRC folder structure?

I have a dashboard and a discord bot projects. And I want both of them in the same repo. My idea is to have ./src/bot and ./src/dashboard. Does Tanstack handles it? Cause NextJS does not (and I wanna get rid of it)....
genetic-orange
genetic-orange4/12/2025

Validate FormData server action with input type="file"

Hello, I'm trying to validate input file on the server but the validation fails: ``` issues: [ {...
flat-fuchsia
flat-fuchsia4/12/2025

CSR at a component level vs a route level?

Is it possible to only CSR certain components? I know you can do it at the route level in the createFileRoute({ssr: false}), but wondering if certain components could be excluded. I need to load in data from local storage to be used in a component, but it can be loaded in after a server render. I would like to avoid using a useEffect hook, if possible.
extended-salmon
extended-salmon4/12/2025

Tanstack Start, React Query, deferred loading, prefetch, streaming

I have been trying to achieve deferred loading for hours now and I cannot make it work. Basically I have /dashboard/* routes that are only accessible to authenticated users. So in my dashboard/route.tsx layout, I prefetch in the loader without awaiting and useSuspenseQuery in the layout. Even this simple setup doesn't work. When I look at the network tab I can see a client call the /me trpc ```ts...
optimistic-gold
optimistic-gold4/11/2025

how to proxy requests to backend only in dev?

anyone know if there is a way that I could proxy /api requests ONLY in dev looking to proxy something like /api/v1/auth/**/* to a different URL only in dev, as in prod will just be same domain πŸ™‚...
deep-jade
deep-jade4/11/2025

Making Tanstack Start work offline

Hello, I've had some success with getting Tanstack Start to work offline in my Progressive Web App. All routes that have been visited are cached for some time. However, I want to make all paths static and cache them on the first visit. Is this possible? I'm also trying to move from a Progressive Web App to Tauri. Has anyone created a Tauri app with Tanstack Start yet?...
vicious-gold
vicious-gold4/11/2025

Blocked request

After deploying to Vercel, I got a blocked request error: "To allow this host, add 'hostname' to server.allowedHosts in vite.config.js." However, I'm not using vite.config.js β€” my project uses app.config.ts instead....
fair-rose
fair-rose4/10/2025

Intermittent 2s delay on server requests in Firefox

Discovered a weird behaviour in tanstack-start, but only in Firefox. Intermittently, there's a 2 second delay for any data being transferred from the server, both for route components and server function data. The timings tab says the 2s delay comes from "Connecting". After it finishes, the next requests take 3-5ms like usual. After navigating the website a bit more, the 2s delay appears again, usually for only a single request. Throttling is off. On Chrome it doesn't happen at all. My router setup and routes are bog-standard. No errors in the console. ```tsx...
No description
frail-apricot
frail-apricot4/10/2025

Debugging huge bundle sizes

Hey there! I've been shipping TSS in production and I noticed that even on small routes my bundle size is quite large. Over 500 kilobytes to be exact πŸ˜Άβ€πŸŒ«οΈ I don't think I quite understand how TSS/TSR is doing code splitting as the offending route is a landing page which I have explicitly isolated from the rest of the application. It does not use server functions. It does not import anything from the main application layout. It was purpose built to be a quick-loading marketing page. ...
other-emerald
other-emerald4/10/2025

Setting/Getting headers does not work?

I've a simple component with a server Fn that will take data and then apply some of that data to the redirect request. ```tsx const serverFn = createServerFn({ method: 'GET' }) .validator((data: PostMessageData) => data)...
conscious-sapphire
conscious-sapphire4/10/2025

Deploying basic Tanstack Start app to Netlify gives 404 - 'dist' folder not found

I went to https://tanstack.com/start/latest/docs/framework/react/examples/start-basic and clicked 'Deploy to Netlify' without editing a single letter of code. It creates a repo on my gitlab account and goes through deployment on Netlify, so far so good. Deployment fails however with the following error message: Configuration error ...
correct-apricot
correct-apricot4/10/2025

Hosting

Am i able to host a tanstack start project on vercel? or is that only for nextjs project hosting? Also on cloudflare pages? or is that for static sites, will fullstack tanstack start app work there too?...
adverse-sapphire
adverse-sapphire4/10/2025

404 Not Found errors for build assets after building TanStack Start application

We have a TanStack Start + Router app - I am trying to upgrade from 1.97.3 to the latest versions of TanStack (1.115.2). We're also using Bun. Out setup was previously working without issues. I've upgraded the packages and can run our app locally and it works. If I build the app with bun run build however, I get a blank page and all of the asset requests 404 in the console. The assets do exist, if I manually inspect the build folder. Not sure what to do to resolve this or what the underlying i...
No description
robust-apricot
robust-apricot4/9/2025

Sending large amounts of data from client to server results in CORS error.

I was playing around with an xgboost package - and i tried to send a large array to a serverFn with useMutation in Start - and it errors out every time. It says CORS error but I am sure that is a red-hearing. When I reduce the size of the array it works fine. Wrapping the serverFn with userServerFn does not help either. I was originally using useQuery but had same results. ...
stuck-chocolate
stuck-chocolate4/9/2025

Accessing environment variables (env vars) in built Tanstack Start app

After building my app in a Docker image with vinxi build, the app is not detecting my environment variables after I start it up. From what I understand, you can declare environment variables, even VITE_ prefixed ones, and they will be detected once the server starts running and consumed by the backend and frontend. Any ideas why this might be happening to me?...
mute-gold
mute-gold4/9/2025

Hook issue when calling server function

Hello! I'm running into an issue when trying to use a server function. Code looks like: ```// functions.ts export const getUser = createServerFn({ method: "GET" }).handler(async () => { console.log("| getUser |"); // XXX: REMOVE THIS...
optimistic-gold
optimistic-gold4/9/2025

Turn off "Injected From Server" logs?

Is there a way to disable the Injected From Server: __TSR_SSR__.initMatch... logs? It's great to have them for some things, but other times they distract from what I'm working on or debugging.
stuck-chocolate
stuck-chocolate4/9/2025

TypeError: Failed to resolve module specifier "h3" after successful build for node-server preset

My app is able to build with npm run build, but my app is mostly not working once I run it. I see the following error in my console:
localhost/:1 Uncaught (in promise) TypeError: Failed to resolve module specifier "h3". Relative references must start with either "/", "./", or "../".
localhost/:1 Uncaught (in promise) TypeError: Failed to resolve module specifier "h3". Relative references must start with either "/", "./", or "../".
Since h3 is a dependency of Tanstack Start, I wanted to check here first to see if there is a potential issue with my build setup. Below is my app config:...
deep-jade
deep-jade4/9/2025

Need help setting up SEO

Hello, I'm trying to render the SEO tags for my library category page on the server. Right now I have an useEffect to set
document.title
document.title
and append meta tags to the head. This should be possible on the server right. Where are the examples with Router or Tanstack start?
deep-jade
deep-jade4/9/2025

Safe to use? (Not leaking credentials to client)

Hi, I plan to use nodemailer to send email, using ServerFunctions. i it safe to have it setup like this: ...