A problem on change of “app” directory structure to “src/app” in Next.js

I have a web project that developed as a regular /app directory. However, I need to change the folder structure to /src/app need for middleware calling from the src directory in internationalization.

Simply, I moved the files because the official documentation says to use the src directory, move the app Router folder or pages Router folder to src. It seems like there is nothing more to do and make sure.

Strangely, the translation instruction works fine with the project that initially configured src directory but not in my case.

Is there anything I miss to accomplish this?

Thanks in advance.

  • The built output (.next) was the confusion. I’ve cleaned it up. Everything is fine now.

    – 




Leave a Comment