API Route giving 404 in production, working locally #4100
Replies: 1 comment 5 replies
-
why is this 404 in production??? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I am simply trying to get auth0 setup - I've done this over a dozen times with no issue. Using latest Next (13) I have this structure:
pages/api/auth/[...auth0].js
I run it locally and it works perfectly.
I deploy to Vercel and I get 404. In fact, I can't seem to be able to ANY routes to work at all when in production.
This give 404 too...but works locally just fine:
pages/api/test
export default function handler(req, res) {
res.status(200).json({ name: 'John Doe' })
}
Any ideas?
Example
https://exchange-ochre.vercel.app/api/test
Steps to Reproduce
I don't know how to reproduce in prod.
Beta Was this translation helpful? Give feedback.
All reactions