New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nextjs route matching doesn't match in vercel but does locally #39411
Comments
The 500 error is from the code i have in the [id].ts not taking login as a valid id. in the replication example it will still return 200 but with 'hello world' as the response instead of { hello: 'world' } |
Hi, I was seeing a similar issue #39266 which appears to be fixed in |
I just tested |
My main issue is why it this happening specifically on vercel but works fine locally |
I could actually reproduce this locally, so investigating. 👍 Looks like the edge dynamic routes have a different priority than non-edge routes |
Fixes #39411 Bug Related issues linked using fixes #number Integration tests added Errors have helpful link attached, see contributing.md Feature Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. Related issues linked using fixes #number Integration tests added Documentation added Telemetry added. In case of a feature if it's used or not. Errors have helpful link attached, see contributing.md Documentation / Examples Make sure the linting passes by running pnpm lint The examples guidelines are followed from our contributing doc Co-authored-by: JJ Kasper <jj@jjsweb.site>
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #653-Microsoft Wed Apr 27 16:06:00 PST 2022
Binaries:
Node: 17.3.0
npm: 8.3.0
Yarn: 1.22.18
pnpm: N/A
Relevant packages:
next: 12.2.2
eslint-config-next: 12.2.2
react: 18.2.0
react-dom: 18.2.0
What browser are you using? (if relevant)
Chrome 104.0.5112.81
How are you deploying your application? (if relevant)
Vercel
Describe the Bug
When having a simple file system route like such
/pages
I've noticed that when running the following configuration locally it works fine. and even when running
yarn build && yarn start
it still works fine. But when running on vercel. I always get the following errorYou will see that the path is being matched to the [id] field and not the login field. But when run locally
which is extremely odd. A piece of useful information may be that [id].ts is an edge function while login.ts is a serverless function.
Expected Behavior
/api/user/login should match to login.ts and not [id].ts in vercel.
Link to reproduction
None
To Reproduce
The text was updated successfully, but these errors were encountered: