All of my tRPC requests returns 404 using create-t3-app.

Hey, guys! As the title says, I'm having a 404 for all my requests. It's my first time using create-t3-app and tRPC, so I bet it's a stupid fucking mistake -- but I'll allow myself since this is the first time I use this thing. I attached the code to the message. Any tips?
14 Replies
Victor Costelini
Forgot to add screenshots of the errors.
Yiannis
Yiannis2y ago
Your session is down too seems like it’s not connecting to db maybe. What are you using for your db
cje
cje2y ago
Does the same thing happen on a stock app?
Victor Costelini
@Yiannis Thanks for the tip. Will check. It's kinda weird the error is a 404 and that no error is shown in the terminal...
barry
barry2y ago
You're not using sqlite are you @Victor Costelini ?
Victor Costelini
No, I'm using MySQL from planetscale.com I'm allergic to sqlite
barry
barry2y ago
You pushed to db? npx prisma db push I take that as no you didn't?
Victor Costelini
I did it, and the problem persists... The push worked well, I just checked at planetscale.com, the tables are there... Weird. I just wanted a real error message, I'm asking too much? 😢 The example route should work even without a database, shouldn't it? Checking at the moment @cje stock works as intented. Means I fucked up somewhere...
cje
cje2y ago
now you get to add stuff back in until it breaks 🙂
Victor Costelini
Nice strategy
Yiannis
Yiannis2y ago
Maybe you didn’t connect properly to planetscale?
Victor Costelini
Old thread, but I found out the problem some days ago. I changed the pageExtensions in next.config.mjs to something like .page.ts and .server.ts. That fucked up the whole project. Don't do that, guys.
Tim
Tim12mo ago
I faced the same Problem some days ago - are there any fixed for this problem?
mirpetri
mirpetri12mo ago
If you get 404, simply the handler is likely not there. First of all check the dir structure it must be /api/trpc/[trpc]/route.js The trpc is there twice. I had the same issue when I was migrating my app from pages router to app router and had the folder structure like /app/api/[trpc]/route.js which caused 404 🙂
Want results from more Discord servers?
Add your server