-
Notifications
You must be signed in to change notification settings - Fork 135
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
Pages Router catchAll route with fallback:false
cause 404 on api route
#677
Pages Router catchAll route with fallback:false
cause 404 on api route
#677
Comments
You need to provide more info here or even better a reproduction. |
Are you using tRPC or anything special with those API routes? You should probably look in CloudWatch logs aswell and see if you can see anything on the default server function. Whats in your |
Hi, The issue also happens on Next 15 (Pages Router). Steps to Reproduce
Environment
Notes |
Are you using |
Yes! There is also a dynamic route using |
We need to change that, right now catchAll As a workaround set it to |
Got it! We'll make the changes, and update this thread with the results. Thanks for your quick reply @sommeeeer @conico974 |
Hi, Your tip did the trick... Both Pages and APIs are working as expected. Out of curiosity... Are you guys planning to release a fix soon? Big thanks for your help!!! You guys rock 😄 |
This will require a bunch of change to work properly. And since there is a very simple workaround it's not high priority. |
fallback:false
cause 404 on api route
Hi @sommeeeer @conico974, |
My company has a large project built with Next.js 12. As Next.js 12 is now outdated, we updated our project to Next.js 14 while keeping the Pages Router structure. Previously, we were using cdk-nextjs-standalone to deploy the application to AWS, and everything was working fine.
However, after upgrading to Next.js 14 and deploying, our API routes topped functioning. To resolve this, we decided to migrate to the SST framework (v3). Despite completing the migration and configuration, our API routes are still not working and continue sending us to 404 page.
Steps Taken:
Updated Next.js from v12 to v14 (keeping the Pages Router structure).
Migrated deployment from cdk-nextjs-standalone to SST (v3).
Configured the SST project following the documentation.
Even after successfully deploying the project with SST v3, our API routes are unresponsive.
Another point to add is that we performed a fresh install deployment of Next.js v15 using the Pages Router, and the APIs are not working either.
The text was updated successfully, but these errors were encountered: