A mistake I made was checking the console in the browser instead of the terminal. It’s a small oversight, but you might be doing the same.
If you are placing the middleware in the src folder like src/middleware.js. Then thats a right placement. I am using nextjs 15.0.3