Nuxt 3 app deploy - trying to load an older chunk

I’m trying to deploy my Server-Side Rendering application with Nuxt, but after several attempts, right after the deployment, my application fails to retrieve some resources. For example, when accessing my page, it returns a 404 error when trying to load the resource https://my-url.com/_nuxt/BPdJZLna.css. From what I understand, this resource belonged to the previous build, so the new deployment can’t find it and returns an error.

When deploying, shouldn’t Vercel clear any possible cache that is causing the application to request this old resource? Is this a problem with a Nuxt configuration or the Vercel deployment?
I am unable to reproduce the error, and strangely, this behavior has never occurred in the deploy preview.

Nuxt version: 3.15.2

There’s another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking v0.

Hi @yojikojio-herosparkc, welcome to the Vercel Community!

Sorry that you are facing this issue. It could have been a one-off instance where your browser had an older version of the app and in the mix of it requested an older resource. But, Vercel does clear the cache on a new production deployment. Moreover all the deployments are independent of each other.

If you need more help, please share your public repo or a minimal reproducible example. That will let us all work together from the same code to figure out what’s going wrong.

Thanks for you answer!
I think I may have discovered the issue. I just remembered that there’s a Cloudflare proxy in front of Vercel. My guess is that Cloudflare’s cache might be serving an old version of the client, which is trying to load outdated chunks of the application. I added a rule in Cloudflare to prevent caching for this application, leaving it for Vercel to handle instead. I’ll keep monitoring to see if this resolves the problem.

1 Like

Thanks for the update! Let us know how it goes :smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.