#404 Error on Sign-In Form After next build in Standalone Mode

1 messages · Page 1 of 1 (latest)

opal kettle
#

I'm running a Next.js 15 app that works fine in development mode. After building it with next build (output: standalone) and running the server (node .next/standalone/server.js), the middleware correctly intercepts requests and redirects to /auth/sign-in, as expected.

However, in production mode, the app triggers a 404 (not-found.tsx), but not in the HTTP response. I can see the page loading in the browser, but something internally thinks it's a 404. This does not happen in development mode.

How can I debug this issue and identify what route is causing the 404? Any ideas on how to fix it?

half surgeBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

opal kettle
#

Find the root cause.

I got 2 breadcrumbs: 1 for my app and 1 for auth

  • /(dashboard)/@breadcrumbs
  • /auth/@breadcrumbs

Yes they have the same name, next build create the both directories.
But don't know why, maybe related to parallel routes, at non development runtime nextjs do not find /auth/@breadcrumbs.
But I rename /auth/@breadcrumbs to /auth/@authbreadcrumbs.
Now its works mind_blow_astonished blob_wave