-
Notifications
You must be signed in to change notification settings - Fork 26k
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
pages/_document.js throwing no-document-import-in-page #28971
Comments
We're also seeing this with developers on Windows. There's a PR that should fix this already merged #28745, it's part of [v11.1.3-canary.4] release (https://github.com/vercel/next.js/releases/tag/v11.1.3-canary.4). Curiously, explicitly installing |
@markxoe Which version of
Let me know if you're still seeing this issue after these steps! |
@ristomatti Hmm not sure why Could you try explicitly upgrading both Next.js and |
Upgrading eslint-plugin-next did the job 👍 |
@housseindjirdeh If I remember correctly, this is what I asked one of the Windows devs to try but can't be sure. We decided to disable the rule for now and see if it gets fixed with the final 11.1.3 (or newer) release. There's a chance this could have been a side effect of npm version mismatch between the devs we noticed a day later |
Fixes build errors from a defect in dependency by bumping to a fixed version. Issue: vercel/next.js#28971
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. |
What version of Next.js are you using?
11.1.2
What version of Node.js are you using?
16.7.0
What browser are you using?
Firefox
What operating system are you using?
Windows 10
How are you deploying your application?
Only Development
Describe the Bug
I am getting the @next/next/no-document-import-in-page linting error, but I am importing the document module in the
pages/_document.js
fileLooks funny when displayed:
Expected Behavior
Not getting an linting error
To Reproduce
Use a Windows machine, create an Next.js App and create a
pages/_document.js
file according to the docs (https://nextjs.org/docs/advanced-features/custom-document) and lint usingnpm run lint
The text was updated successfully, but these errors were encountered: