tRPC won't work in Production
For some reason, tRPC won't work in production. I have the schema updated in the main branch, on PlanetScale, and I know because I can see the most recent data.
Logging in also works. But nothing else does. The error doesn't tell me anything, and everything works fine in a local environment, even if I connect to the main database.
I think this is a Vercel problem, but I don't even know where to start debugging it
4 Replies
I don't think I'm doing something wrong with tRPC itself, since everything was working last week
Our latest update was just to update the main database, but like I said, everything works if I try locally
And this makes no sense. This table exists in the database and I double checked the environment DB connection string, it is the correct one
My suspicion is that, somehow, Vercel probably isn't connecting to the latest version of the database. I don't even know how that could be possible, but I can't think of anything else
[Solution]
Turns out I didn't do
npx prisma db pull
... which honestly doens't make sense to me that the prisma.schema
had different versions on PlanetScale and Github..
I don't know how or why that happened, but there you go.