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
Forgot to add screenshots of the errors.



Your session is down too seems like it’s not connecting to db maybe. What are you using for your db
Does the same thing happen on a stock app?
@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...
You're not using sqlite are you @Victor Costelini ?
No, I'm using MySQL from planetscale.com
I'm allergic to sqlite
You pushed to db?
npx prisma db push
I take that as no you didn't?
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...now you get to add stuff back in until it breaks 🙂
Nice strategy
Maybe you didn’t connect properly to planetscale?
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.I faced the same Problem some days ago - are there any fixed for this problem?
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 🙂