JavaScript Bundle Issues - Netlify Build Breaking Several Hours after Deployment completes

I have been getting the same issue for several days. Chunks missing on main pages. Redeploying with a Cache rebuild temporarily fixes the issue, then it returns.

Have attempted several fixes, but none are sticking.

1 Like

I am facing the same issue with NextJs… my customers are not that amused. Anything we could do?

1 Like

Is this a Durable Caching issue? I don’t have that in my cache settings, but I noticed its been changing in the request headers and its in the release email that just went out.

Again, this has been breaking production for several days. If there is any other status that is public, would love to watch it for updates.

We’re having the exact same issue with next.js: old chunks are still getting requested even though the cache was cleared and the PurgeAPI was called. It happens 1-2 hours after a redeploy. Is there any way to disable cache altogether on Netlify?

Hi all - update here, we’ve shipped a fix to remedy the issue. We’re currently working to purge the cache for affected sites but at this point if you redeploy you should see the issue resolved.

2 Likes

I did a last purge and redeployed. Your fix did the trick, thanks! :grinning:

For posterity sake found this thread here Getting odd MIME type check error Β· vercel/next.js Β· Discussion #68257 Β· GitHub

1 Like

Was facing this same issue. I haven’t had time or capacity to check the purge solution, for the moment I have had to revert to V4 runtime and hope that the deployment sticks. Will keep this forum updated in case I get a chance to try the solution.

Hi! @Bibhash_Dash @sid.m
I’m experiencing the same issue. My application has been online for about 3 months, and I’ve never had this issue before. I believe I’ve been using runtime v5 by default.
How did you revert to use runtime v4?

My application had been running flawlessly until now, but this morning some pages started failing randomly. If I redeploy, those pages get fixed, but then other random ones break. If I purge the cache, some get fixed… Would completely disabling the cache in the netlify.toml solve the issue?

Issue has started occurring for me today as well

Build Logs
9:43:06 AM: Netlify Build                                                 
9:43:06 AM: ────────────────────────────────────────────────────────────────
9:43:06 AM: ​
9:43:06 AM: ❯ Version
9:43:06 AM:   @netlify/build 29.58.7
9:43:06 AM: ​
9:43:06 AM: ❯ Flags
9:43:06 AM:   accountId: [redacted]
9:43:06 AM:   baseRelDir: true
9:43:06 AM:   buildId: [redacted]
9:43:06 AM:   deployId: [redacted]
9:43:06 AM: ​
9:43:06 AM: ❯ Current directory
9:43:06 AM:   /opt/build/repo
9:43:06 AM: ​
9:43:06 AM: ❯ Config file
9:43:06 AM:   No config file was defined: using default values.
9:43:06 AM: ​
9:43:06 AM: ❯ Context
9:43:06 AM:   branch-deploy
9:43:07 AM: ​
9:43:07 AM: ❯ Using Next.js Runtime - v5.9.4
9:43:08 AM: No Next.js cache to restore

Heres the error message in the dev console

Refused to execute script from 'https://<redacted>/_next/static/chunks/webpack-5920183356e15be1.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.

In the netlify console, I can see the file though :thinking:

@markossankey same error here

As a workaround, I used the purge api. Not sure if the issue will pop back up though, but will come back if it does

I also used the purge API, but if you deploy again or even without deploying, sometimes the same error randomly reappears across the pages. I also tried switching every static page to SSR because I thought the problem was only with the static pages, but at this point, I’m not sure.
I wonder if it might be related to the Node version, the server cache management, or something else causing these errors.

@markossankey @guilleCM thanks so much for reporting this issue, I’m going to move both of your tickets to our helpdesk to get some more relevant details about this problem. I’ll follow up via email directly!

We’re also facing the same issue on our production site so will keep checking this thread

@sid.m Thank you!
Just so you know, I haven’t made any changes to the server since I noticed the errors, yet the issue still persists randomly. When I detect the error, I purge the cache via the API, which fixes it, but after a while, it randomly reappears.

I’ve created a ticket for you in our helpdesk to get some additional details

I’m experiencing the same issue too. Like the others here, the site was loading fine a few days ago but I’ve been seeing these errors since yesterday morning. Quite frustrating when we have a go live date on Friday.

Are you aware of the cause of the issue or have an ETA on a fix for it?

2 Likes