kgb4861
TTCTheo's Typesafe Cult
•Created by kgb4861 on 12/7/2023 in #questions
trpc error when deploying t3 app to AWS using sst
Deleted a different post about this issue. I'm trying to setup a t3 app on AWS and it is partially working. When I submit a new post using the CreatePost component, the page doesn't refresh and the error message I get is
TRPCClientError: Cannot read properties of undefined (reading 'resolve') at a.from (https://....)
If I manually refresh the page, the new post is updated in the UI, so it's hitting the db. When I check the network tab, the tRPC request I made returns with a 200 status code but the response is
47
{"0":{"result":{"data":{"json":null,"meta":{"values":["undefined"]}}}}
1
}
0
The trpc method is just this:
create: publicProcedure
.input(z.object({ myData: z.string().min(1) }))
.mutation(async ({ ctx, input }) => {
// simulate a slow db call
//await new Promise((resolve) => setTimeout(resolve, 1000));
await ctx.db.insert(posts).values({
myData: input.myData,
});
}),
Anyone having similar issues with this?7 replies