CSS randomly stops loading on Nextjs site - MIME and 404 errors

Hi! I’m having a weird issue where my site looks normal for a couple of hours, and then the CSS files randomly stop being applied. The browser console claims that it’s a 404 error OR a MIME “type/html” error.

The CSS files are always applied correctly in dev mode, and they’re also fine after a new build. For some reason, they stop being “found” a couple of hours after deployment…

I have updated all dependencies, checked all my CSS files for hanging colons or errors, and I’ve wiped the cache and rebuilt the site countless times. Nothing is working and I have no idea how to fix this.

I’ve also confirmed that the base directory in Netlify is set to the root of my project, “/”. Someone else has an identical issue here: Getting odd MIME type check error · vercel/next.js · Discussion #68257 · GitHub.

Live site: https://main--joakimandersson.netlify.app/
Github repo: GitHub - Joakim-Andersson/photo-portfolio

**Note: If the site seems to work for you at first, just refresh it again in an hour LOL

Hi there! We’ve shipped a fix to address this issue, please refer to this thread for the most recent updates: JavaScript Bundle Issues - Netlify Build Breaking Several Hours after Deployment completes