next.js icon indicating copy to clipboard operation
next.js copied to clipboard

ChunkLoadError: Loading chunk node_modules_next_dist_client_dev_noop_js failed

Open paales opened this issue 4 years ago • 6 comments

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.

Screenshot 2021-09-28 at 12 06 52 Screenshot 2021-09-28 at 12 06 57 Screenshot 2021-09-28 at 12 07 04

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..

paales avatar Sep 28 '21 10:09 paales

try to delete the next build folder, it worked for me and then run "npm run dev"

samymedia avatar Sep 28 '21 14:09 samymedia

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? 🙂

paales avatar Sep 29 '21 07:09 paales

Definitely @paales – thanks a lot for taking the time to report.

rauchg avatar Oct 18 '21 19:10 rauchg

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.

deadcoder0904 avatar Oct 19 '21 10:10 deadcoder0904

Almost a year later. Stackoverflow answer now at 54 000 views 518 upvotes.

neilDuToit133 avatar Aug 04 '22 14:08 neilDuToit133

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.

ijjk avatar Aug 05 '22 02:08 ijjk

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.

paales avatar Aug 30 '22 15:08 paales

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 avatar Sep 05 '22 09:09 eFFeeMMe

@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!

ijjk avatar Sep 05 '22 16:09 ijjk

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.

github-actions[bot] avatar Oct 06 '22 00:10 github-actions[bot]