next.js
next.js copied to clipboard
ChunkLoadError: Loading chunk node_modules_next_dist_client_dev_noop_js failed
What version of Next.js are you using?
11.1.2
What version of Node.js are you using?
14.x
What browser are you using?
Chrome
What operating system are you using?
MacOX
How are you deploying your application?
vercel
Describe the Bug
I couldn't find a bug reported yet.
Sometimes while starting the development environment it seems that the .next cache gets corrupted.
https://stackoverflow.com/questions/67652612/chunkloaderror-loading-chunk-node-modules-next-dist-client-dev-noop-js-failed
Expected Behavior
I wouldn't expect this error to occur.
To Reproduce
I'm not exactly sure..
try to delete the next build folder, it worked for me and then run "npm run dev"
That indeed works, maybe I didn't make it clear: There is a workaround, delete the .next folder and it will work. However, it shouldn't happen or the error should be more clear, right? 🙂
Definitely @paales – thanks a lot for taking the time to report.
Was gonna create an issue but searched first. I faced the same error, Google'd & stumbled upon this Stackoverflow answer with more than 337 upvotes & 23k views so I believe this should be prioritized.
The error comes out of nowhere & stays there. Makes you wonder if you did something wrong with your project.
Almost a year later. Stackoverflow answer now at 54 000 views 518 upvotes.
Hi, can someone who has experienced this confirm this is still being encountered in the latest version of Next.js v12.2.4? We have updated webpack a few times since this was opened and I am not able to reproduce this currently in the latest version.
I have never seen this in the last half year I think and for me it is resolved. Maybe since SWC, I don't know for sure.
can someone who has experienced this confirm this is still being encountered in the latest version of Next.js
I'm experiencing this issue (I mean ChunkLoadError, not necessarily of the node_modules_next_dist_client_dev_noop_js chunk) on production deploys using Next 12.2.5. Unfortunately I'm still unable to reproduce the issue reliably, making it hard to identify its root cause.
@eFFeeMMe the mentioned error doesn't sound related to this issue as this is specific to the dev error node_modules_next_dist_client_dev_noop_js. The ChunkLoadError itself can occur in production due to network issues or similar that cause the chunk to fail to load. This can be caught by adding a .catch() to dynamic imports and then optionally doing a hard navigation or rendering an error state.
If a ChunkLoadError occurs for any internal Next.js requests we will automatically do a full page navigation to tolerate this.
I'm gonna close this specific issue now as it appears to be resolved. If you are having separate issues from this please open a new issue and we can investigate those further!
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.