DEV Community

Discussion on: How to retry when React lazy fails

Collapse
 
debo07 profile image
Debajit Majumder

Could you please elaborate on this - "The reason for failing to download might be related to a recent deployment which changes the chunk hash and/or order number."?

I believe I am facing similar issue where just after a new deployment I able to see blank page with this console error.

Uncaught (in promise) Error: Loading chunk 7 failed.
(missing: domain.com/js/vendors~module1.bund...)
at HTMLScriptElement.i (bootstrap:120)

Collapse
 
0xdevalias profile image
Glenn 'devalias' Grant

I would suggest having a look at this blog and/or StackOverflow answer, as I feel they better describe the problem (and the 'why' of it), as well as providing some better solutions:

As Ricardo mentioned above in dev.to/maininfection/comment/727e this ChunkLoadError generally tends to happen when pushing new code, while the client's browser still has the old/outdated 'list of chunks' cached.