Type 'Promise<void>' is not assignable to type 'never'
getting these weird errors after updating all start/tanstack packages
24 Replies
absent-sapphireOP•2mo ago
actually here's the whole chunk here with
head
because commenting out the head part fixes it...
manual-pink•2mo ago
can you put this in one of our examples so we have a complete project we can just clone and debug?
absent-sapphireOP•2mo ago
GitHub
GitHub - f1shy-dev/reproduction-issue-tanstack-start
Contribute to f1shy-dev/reproduction-issue-tanstack-start development by creating an account on GitHub.
absent-sapphireOP•2mo ago
reproduced the first issue in
src/routes/__root.tsx
working on trying to get the second one reproducedmanual-pink•2mo ago
ok so this type error occurs because you return something from loader that contains some unknown types
which we prohibit, since this could mean it is not serializable at runtime
however, you dont need all of this
manual-pink•2mo ago
just use our query integration: https://tanstack.com/router/latest/docs/integrations/query
TanStack Query Integration | TanStack Router Docs
[!IMPORTANT] This integration automates SSR dehydration/hydration and streaming between TanStack Router and TanStack Query. If you haven't read the standard guide, start there. What you get Automatic...
absent-sapphireOP•2mo ago
that resolves this one!
but i'm not really sure how to reproduce this other one
manual-pink•2mo ago
Ensure correct order of inference sensitive properties for createRo...
For the following functions, the property order of the passed in object matters due to type inference: createRoute createFileRoute createRootRoute createRootRouteWithContext The correct property order...
manual-pink•2mo ago
so reorder, loader before head
absent-sapphireOP•2mo ago
ok that worked
that is such a random thing 😅
i didn't know there is an eslint plugin though, TIL!
will add that...
wait no i use biome
manual-pink•2mo ago
absent-sapphireOP•2mo ago

absent-sapphireOP•2mo ago
thanks for the help!
manual-pink•2mo ago
yes it's unfortunate that typescript works like this...
absent-sapphireOP•2mo ago
actually i did have another quick question
manual-pink•2mo ago
sure
absent-sapphireOP•2mo ago
(finding the file, 1min)
earlier i had a nitro.config.ts
now i'm using the
cloudflare-vite plugin
is there an easy way to setup rewrites like this now? or would i have to manually just set that up in something like server.tsx (or a file route)?manual-pink•2mo ago
not aware of any "easy config" here
manual-pink•2mo ago
maybe ask here? https://github.com/cloudflare/workers-sdk/discussions
GitHub
cloudflare workers-sdk · Discussions
Explore the GitHub Discussions forum for cloudflare workers-sdk. Discuss code, ask questions & collaborate with the developer community.
manual-pink•2mo ago
if there is a cloudflare specific way
otherwise, yes you would need to configure those proxies manually
we might add some utils later, but you would still need to employ them
absent-sapphireOP•2mo ago
the cf worker will run on any non-assets route anyway right
so i should be fine to just make an api route with a splat which does this
manual-pink•2mo ago
yes an api route should work. or a request middleware
there are a few options
absent-sapphireOP•2mo ago
does server.handlers support like a
*?
like all http methods through one functionmanual-pink•2mo ago
yes
ANY