I am getting this error during build time because of Next.js custom document.
So, during the build time I am getting an error saying, Also I have the _document.js in pages/_document.js.
next/document should not be imported outside of pages/_document.js. See https://nextjs.org/docs/messages/no-document-import-in-page.
Please help me!
EDIT
Update next and eslint-config-next to version 11.1.3-canary.7

next/documentlaying somewhere else?