T
tRPC

❓-help

Dynamic Server Usage Error from RSC calls

TTribe1/10/2024
posted this on the create-t3-app server as well but not quite sure if the issue is T3 or TRPC related. But hoping I can at least get a recommendation from someone here. Essentially, making a TRPC call from any RSC component causes the build process to throw a dynamic server error. The app still appears to build but I am obviously concerned about the health of the project moving forward. I have found a handful of workarounds but they all seem rather hacky. Could anyone offer some advice how to approach this or are people just forcing dynamic rendering at the top of the file and moving on? Thanks in advance.
No description
AKAlex / KATT 🐱1/10/2024
Sounds like it could bug as we got a similar report in our issues today, please open an issue with a repro? I can fix tomorrow
TTribe1/11/2024
open it on t3 repo?
AKAlex / KATT 🐱1/11/2024
Trpc
TTribe1/11/2024
will do, thanks
KGKeelan Gibb1/24/2024
export const dynamic = "force-static"; This makes the build run by forcing all dynamic functions like headers and cookies to return empty values. This is not ideal because every RSC trpc call will need this at the top but this lets these be static pages instead of dynamic ones at the cost of disabling headers and cookies. calling cookies() inside the RSC (not the createContext func) or setting the variable to force-dynamic instead will also fix the build issues but it turns them into dynamic pages.

Looking for more? Join the community!

Recommended Posts
Node 20, NPM: Send form values to DB with tRPC?Hey all, anyone in here with some tRPC experience? I have been going through YouTube video's and thGetting type error in v11 when trying to instantiate createTRPCQueryUtils```Type 'CreateTRPCReactBase<CreateRouterInner<RootConfig<{ ctx: object; meta: object; errorShape: DLoggerLink logging only via server logger in prodI have a logger link setup as declared in https://trpc.io/docs/client/links/loggerLink#usage ```ts Better error tracing when using TRPC routersHi, I'm using a trpc router and noticed that the error trace report is more or less non existent as client side Validation with ZODwill trpc validate input on the client before sending it to the server ?We're having some serious Intellisense performance issues with v10Hello. We have about ~30ish routers in `mergeRouters` (we're working on changing this to a namespaceParsing FormData on trpcHi all, I have function to put object on S3 const putObjectToS3 = async (body: FormData) => { ... }TRPC to connect a client app with a backend apigateway ?Hi everyone! Is it a good practice to use TRPC to connect my client application (Next.Js) with my bWebsocket server implementations with TRPC createWSClientIs anyone aware of a websocket server that is compatible with trpc websocket client that isn't usingAdvanced Permissioning In MiddlewareI need to handle somewhat complicated permissioning logic, for example: `User A can read (but not How is the Client Generated with just the typesI'm trying to build a trpc like app for building restful apis with sveltekit. In trpc sveltekit onlyGenerate iOS Swift tRPC clientHey all, I'm looking to get pointed in the right direction for how to best generate a native tRPC cMiddleware that returns data instead of throwing errorIs there any way for a middleware to return typed data instead of throwing an error? I can only see Including multi-tenant config into tRPC contextHey all, I've been working on upgrading my app to support multi-tenancy, inspired by Vercel's Platf