Next.js Discord

Discord Forum

Nextjs port 3000 always redirect to /en/home

Unanswered
Orchard Oriole posted this in #help-forum
Open in Discord
Avatar
Orchard OrioleOP
I have super weird issue on my mac.

I have fresh nextjs app. No process running at 3000.
However if i do npm run dev and open localhost:3000/ it always redirect me to localhost:3000/en/home

Not sure whats happening,
I am checking there is no port running at 3000.
And it's fresh created app.

Note :

- I have trying to kill-port 3000, and rerunning.
- It works if i am not using port 3000, eg, 3010.

4 Replies

Avatar
Mallow bee
Is this only in a single browser?
One possibility is if a service worker was ever registered for localhost:3000, even for a different project, the browser will remember and run it. If that's the case, you can delete it in dev tools (Application tab I think)
Avatar
if it redirects to /en/home then you changed the middleware or are using the lang module
a fresh app does not do that