Middleware not running in fresh Next.js project (redirect not working) #82957
Replies: 3 comments
-
Hey! This happens often when middleware isn’t triggered. A few things to check:
Let me know your project layout (App vs Pages router or |
Beta Was this translation helpful? Give feedback.
-
When you say:
This can be incorrect, if you are using
Could you confirm that you are using |
Beta Was this translation helpful? Give feedback.
-
Thanks for pointing that out! 🙌 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I just created a new Next.js project and added a simple middleware to redirect /profile to /. However, the middleware is not running at all. I don’t even see the console.log output, which means it’s not being triggered.
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions