getStaticProps next 13 with tRPC

I'm not being able to find a solution to get this working, I'm using create-t3-turbo but the createTRPCContext function takes req and res which are not accessible with the getStaticProps. Not only that but the Can't resolve v8 error also appears when trying to use getStaticProps Any ideas?
2 Replies
barry
barry2y ago
import { createProxySSGHelpers } from '@trpc/react-query/ssg';
import { createContext } from 'server/context';
const ssg = createProxySSGHelpers({
router: appRouter,
ctx: await createContext(),
transformer: superjson, // optional - adds superjson serialization
});
import { createProxySSGHelpers } from '@trpc/react-query/ssg';
import { createContext } from 'server/context';
const ssg = createProxySSGHelpers({
router: appRouter,
ctx: await createContext(),
transformer: superjson, // optional - adds superjson serialization
});
Liltripple_reid
there's no package called 'server/context' because the createTRPCContext comes from the default definition made in t3-app
Want results from more Discord servers?
Add your server