Netlify build result suddenly changed

Hi there,

I have a weird issue happening at the moment, so last night when I was building my Gatsby project, the website looked completely fine, e.g branch build here:

However now for some reason the HTML is all messed up in the production build: I had some code inside the frontend which parsed out the paragraph/p tags in the headings (using html-react-parser if that matters) to ensure that they appear properly but for some reason it’s not being applied in the latest builds.

I ran/served it using my local Gatsby and I can’t see anything wrong with it, even though it is pointed at the same Wordpress instance and is running the exact same build conditions (node version 18.19.0, npm version 10.2.3)

I even tried deploying it in Vercel just to make sure it wasn’t my local and it appears fine there as well:

I’ve tried clearing cache and rebuilding it several times but nothing has changed, any idea what could be happening? The only thing that I can think of is that my local package.json is ensuring that the right packages are being served, OR there’s some sort of Gatsby optimisations being ran by Vercel behind the scenes which is causing my HTML to be overriden. Unfortunately I couldn’t find a way to disable that so I can’t test if that is the root cause.

I can’t find the site you’ve linked anymore.

Hi @hrishikesh ,

Ah yeah sorry the client was asking for an urgent solution so I ended up just deleting my Netlify instance and remaking everything in vercel (where it showed up normally)

I tried everything, cleared build cache, checked node versions, yarn versions etc, and couldn’t figure it out so I just ran out of time and ideas.



Hey Erick! Sorry we couldn’t get to you fast enough. If you remake the project here and still have issues, please let us know and we’ll check it out!