Skip to content

Pages Router catchAll route with fallback:false cause 404 on api route #677

Closed
@gabriel-wow

Description

@gabriel-wow

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.

Versions:
Next.js: v14.2.20
SST: v3.3.65
OpenNext.js: 3.2.2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions