Next.js Discord

Discord Forum

ChunkLoadError: Loading chunk app/page failed for Nginx proxy

Unanswered
Gharial posted this in #help-forum
Open in Discord
GharialOP
I'm using Next@13 with the app-router and am experiencing the following issue with local development.

Currently in my company's staging/production web-app, we use nginx to reroute traffic depending on the URL path. In my local machine,

I tried to mirror this (set up nginx, run the next server, point nginx at the next server) so my local environment matches staging/production as closely as possible.

Whenever I go to http://127.0.0.1', the next app starts to load but then I get this error on the browser window: "ChunkLoadError: Loading chunk app/page failed." In the server logs I see a cache miss.http://127.0.0.1/api/conversation 200 in 13ms (cache: MISS)`

Attached is what shows up in my console.logs

This happens intermittently, if I refresh enough times the app works. It looks like a cache miss issue, but I'm not sure the best way to debug this. My hunch is that this is something wrong with my NextJS set-up but wanted to see if others have encountered this. The weird thing is it does not show up in staging/
production.

Thanks!




```

2 Replies

i googled it, some of pages say it is due to Chrome browser. Would it happen to other browsers like Safari? plus, it might be related to HTTP/1.1, try ngrok to access over https
GharialOP
Hey thanks for the suggestions! Using safari I got a similar issue. I thought about using ngrok but it would just make spinning up my local environment a hassle. I'll just live with it for now since the pain isn't that bad but will update in case I discover a better fix.