T3 Stack: ReferenceError: Cannot access 'createCaller' before initialization
I want to use tRPC with mutations to upload a file in Next Js / T3 Stack with Supabase.
But no POST requests are working. The default 'post' mutation from the T3 stack template also does not work.
tRPC SHOULD config be correct, and should be able to run mutations, as I followed the installation guide. Because the default "post" also does not work, Supabase and the submission of FormData shouldn't be the problem.
What leads into the errors is the
createCaller()
:
```
// src/trpc/server.ts
...
const caller = createCaller(createContext);
export const { trpc: api, HydrateClient } = createHydrationHelpers<AppRouter>(
caller,
getQueryClient,
);
// src/server/api/root.ts
...
export const createCaller = createCallerFactory(appRouter);1 Reply
Can someone help me? Testing out for 2 days now