-
Notifications
You must be signed in to change notification settings - Fork 27.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[appDir] middleware is not executed or packed when used with appDir #42686
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
I can confirm this issue as well. It is a bit difficult with new vs legacy documentation. I have tried the following based on various documentation sources:
All of these still result in the middleware function not being utilized. I plan to switch to not use the |
Same here, there is a workaround that I found to work though. Create a pages directory with an empty “.gitkeep” file in it. Middleware started working after that. |
Duplicate of #41995 |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.1.0: Sun Oct 9 20:15:09 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T6000
Binaries:
Node: 18.12.0
npm: 8.19.2
Yarn: 1.23.0-20220130.1630
pnpm: 7.14.0
Relevant packages:
next: 13.0.3-canary.2
eslint-config-next: 12.2.0
react: 18.2.0
react-dom: 18.2.0
Describe the Bug
middleware is not executed or packed when used with app dir
Expected Behavior
After enable appDIr, middleware should still work.
Link to reproduction - Issues with a link to complete (but minimal) reproduction code will be addressed faster
https://github.com/promer94/next-middleware-app
To Reproduce
The
Set-Cookie
header is missing from reponse header and theconsole.log
did not executeThe text was updated successfully, but these errors were encountered: