ChunkLoadError:加载块node_modules_next_dist_client_dev_noop_js失败

我一直在关注 Next.js 网站上的基础教程,当我进入全局样式步骤时,我开始收到以下运行时错误:

ChunkLoadError: Loading chunk node_modules_next_dist_client_dev_noop_js failed.
(error: http://localhost:3000/_next/static/chunks/fallback/node_modules_next_dist_client_dev_noop_js.js)

错误 1:

错误 2:

我完全按照所有步骤操作,当我关闭错误弹出窗口时,该应用程序运行良好。

如果有人能对此提供任何指导,我将不胜感激!

回答

尝试删除.next项目根目录下的文件夹。

我刚刚遇到了同样的问题,我不知道为什么,但这显然是由缓存引起的。也许你的也是。

在浏览了 GH 问题和各种博客文章后,我的结论是没有人知道这个与 webpack 相关的错误到底发生了什么,可能是由 Next.js 的行为引起的。

  • Allow me to add my upvote, happened after modifying rewrites and changing the pages folder structure... 🙂
  • As a side note: this answer is 1 week old, and it already has 5 upvotes. This is a real problem, and wherever it comes from, it needs to be fixed...

以上是ChunkLoadError:加载块node_modules_next_dist_client_dev_noop_js失败的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>