As per title, I have a feature on my website that renders perfectly fine in my local development environment, but the same repo that is deployed to my Netlify site doesn’t render correctly at all.
In this case, I’m using Mapbox to render a map view, which as below has a broken overlay for the navigation/copyright section:
I’m wondering what might be causing this or if anyone else has seen this before? It’s just rather odd that this is only the case on the Netlify-hosted site, so seems to be an issue with the build/deploy environment. I can’t see anything in the build/deploy logs that is of concern. I also can’t see any errors in the console when I load the page, or on the sveltekit-render Netlify function.
For reference, I’m using SvelteKit with the Netlify adapter.
@j-e I did, but I can barely keep up with what does/doesn’t use middleware these days and there’s an abundance of issues on the forums caused by it all.
If you can produce static output, and host static output, then you should, and you should check that.
It’ll allow you to spot if it’s something about your own build process causing it.
Excellent, that’s all I was really trying to help you spot.
I can’t say exactly why it’s occuring for you, but it’s very common for people to encounter issues upon deployment to Netlify, but not realize that the actual issue is some difference between the output of their Build command and their Develop command.
The quicker you spot it’s in your codebase, the quicker you can self-solve, otherwise you can get stuck waiting for Netlify to respond.