node.js - Nextjs - 在 pages/_document 之外导入下一个/文档错误
问题描述
由于 Next.js 自定义文档,我在构建期间收到此错误。
因此,在构建期间,我收到一条错误消息,说我也有_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.
请帮我!
编辑
将 next 和 eslint-config-next 更新到版本 11.1.3-canary.7
解决方案
推荐阅读
- sql-server - 如何将包含文件流的 SQL Server 数据库从一台服务器附加到另一台服务器
- reactjs - Material UI - Stepper 组件 - 异步图标
- vba - VBA - 如何在Visual Basic中的一个字段中选择多个值进行应用?
- javascript - ReactJS 和 material-ui 没有在移动设备上呈现页面的整个宽度
- node.js - 如何允许任何用户使用 youtube API 在我的 youtube 频道中上传视频?
- java - 文件未在 Java 中删除
- parsing - JCup 中的错误恢复。块末尾缺少分号
- python - 在 python 多线程中创建线程
- django - 是否有用于运行 Celery worker 的 Django manage.py 命令?
- flutter - Flutter Build - Gradle 任务 assembleDebug 失败,退出代码为 1