-
Notifications
You must be signed in to change notification settings - Fork 27k
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
next/server should not be imported outside of pages/_middleware.js #32121
Labels
Linting
Related to `next lint` or ESLint with Next.js.
Comments
balazsorban44
added
Linting
Related to `next lint` or ESLint with Next.js.
kind: bug
and removed
bug
Issue was opened via the bug report template.
labels
Dec 5, 2021
This is being addressed in #32139 |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
natew
pushed a commit
to natew/next.js
that referenced
this issue
Feb 16, 2022
…rcel#32139) People have been reporting on vercel#30973 that the `no-server-import-in-page` eslint rule is reporting false positives for `_middleware` files inside sub-page folders. Unlike `_document`, we can have multiple `_middleware` files. Fixes vercel#32121
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
What version of Next.js are you using?
12.0.6
What version of Node.js are you using?
14.18.2
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
Vercel
Describe the Bug
I have added _middleware.tsx file in /pages/login/_middleware.tsx and it gives error.
Expected Behavior
It should not give any error
To Reproduce
My files
_middleware.tsx
Folder structure
The text was updated successfully, but these errors were encountered: