tRPC fetch breaking when building Next project
I'm testing out tRPC, and I've tried fetching some asynchronous data. This only happens during
pnpm build
, dev mode works completely fine.
The fetch is prefetched in the page, and then actually fetched within the component.
It always errors in this way when it gets to the static page generation step.
2 Replies
I fixed it by having a random api call above/below it. I have no clue why this is necessary, so if anybody knows how I can remove the api call, pls lmk
GitHub
trpc/examples/.experimental/next-app-dir/src/app/rsc-rq-prefetch/pa...
🧙♀️ Move Fast and Break Nothing. End-to-end typesafe APIs made easy. - trpc/trpc