Static server function not found
Hi, I am trying to use https://tanstack.com/start/latest/docs/framework/react/guide/static-server-functions#what-are-static-server-functions
But after trying it I see that client tries to get this data but receives not found
After build I see this json file in the
/dist/client/__tsr/staticServerFnCache/someId.json
However this url outputs not found
http://localhost:3000/__tsr/staticServerFnCache/54459eae0cf4392adc3faaad6e0549fbaadcb877.json
3 Replies
inland-turquoiseOP•2w ago
I guess this function should live in
/.output and not in /dist?
however even after changing nitro dir to /dist
we end up with this in the folder
and loader when calling static server fn tries to GET
http://localhost:3000/__tsr/staticServerFnCache/54459eae0cf4392adc3faaad6e0549fbaadcb877.json
and it is still not foundinland-turquoiseOP•2w ago
https://github.com/stachujone5/tanstack-start-prerender-repro/tree/static-server-fn
reproduction is on this branch
GitHub
GitHub - stachujone5/tanstack-start-prerender-repro at static-serve...
Contribute to stachujone5/tanstack-start-prerender-repro development by creating an account on GitHub.
inland-turquoiseOP•2w ago
This fixes it then we bundle all the public assets to client folder which is generated by static server function
and well it works...