Next.js Discord

Discord Forum

Caching with Opennext on Cloudflare: Uncaught ChunkLoadError

Unanswered
Britannia Petite posted this in #help-forum
Open in Discord
Britannia PetiteOP
We have a very (!) large site that we are trying to cache on the edge using cloudflare. App is deployed on CF workers. Now, all works well but the issue is that we run into errors when rebuilding the app so that the js chunks change. When loading a page then we often get this error:

Uncaught ChunkLoadError: Loading chunk 2797 failed.


I am aware why this issue is arising, because the underlying JS file apparently does not exist anymore. However, is there any good strategy how to solve this issue? We are using a KV cache strategy and try to cache all GET routes.

Does anybody have an idea how to go about this?

0 Replies