Next.js Discord

Discord Forum

Error in routes path undefined on f5 (refresh)

Unanswered
Yellow-bellied Sapsucker posted this in #help-forum
Open in Discord
Yellow-bellied SapsuckerOP
The error occurs when the Next.js application makes a request to the URL http://localhost:8083/settings/undefined, resulting in a 404 Not Found. This issue happens regardless of the route: even on simple pages like /contacts, after refreshing, the console inside the middleware logs the route as /undefined.

This indicates that some expected value (such as a dynamic route parameter or a configuration variable) is being passed as undefined in the middleware. However, the application still works normally and shows no visible errors on the screen. The problem is limited to page reloads (F5).

I am using Next.js 15 together with next-intl.

2 Replies

Yellow-bellied SapsuckerOP
:lolsob:
Yellow-bellied SapsuckerOP