having a bug when hosting Tanstack Start on a VPS
I’ve got a TanStack project running on an AWS Lightsail VPS. The site loads fine when navigating around normally.
However, when I reload a page that uses a route loader with an external API endpoint (instead of createServerFn), I get this error:
I’ve attached a video showing exactly what’s happening (which is what happens on the site).
The external endpoints themselves are working fine, it only fails on page reload.
this is the error in the console
in the sidebar the I am loading perferctly fine, I am using
useQuery(userMeQueryOptions());
this is my vite.config.ts
Any ideas?1 Reply
adverse-sapphire•2mo ago
not 100% sure but this might have to do with target: bun
for some reason, only in a prod docker image, when targetting bun, the first load would work fine, but subsequent reloads wouldnt work
targetting node instead made it work fine