由于 Next.js 自定义文档,我在构建期间收到此错误。
因此,在构建期间我收到一条错误消息:“我也有 in _document.js” 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.
Run Code Online (Sandbox Code Playgroud)
请帮我!
编辑
将 next 和 eslint-config-next 更新到版本 11.1.3-canary.7