We need to know your netlify site name. Example: gifted-antelope-58b104.netlify.app
DNS issues? Tell us the custom domain, tell us the error message! We can’t help if we don’t know your domain.
Build problems? Link or paste the FULL build log & build settings screenshot
Did you try Ask Netlify, our generative AI chatbot, before posting? It pulls info from Support Guides and recent solved forums posts.
The better the post - the faster the answer.
I deployed a build at lka.netlify.app. It defaults to dark mode, and the light mode button isn’t working on all pages.
However, on 404 pages like https://lka.netlify.app/categories and lka.netlify.app/tags, it initially shows dark mode but then switches to light mode. Please check.
I also observed that this problem do not exist in local host.
In case you didn’t understand, that means I opened the URL to verify the behaviour and was unable to verify it. This means the page opened in dark mode and stayed in dark mode.
My devices default to dark mode. However, even when I request light mode on the site, it doesn’t work—it remains in dark mode. This indicates there is an issue with how the dark/light mode works on the site. You’re using gatsby which is high on the list of frameworks I steer well away.
I suggest you test productions builds locally. After running dev mode, remove any output/build directory and run the build command for the project (e.g. npm run build.) If you have a package like serve installed globally test the build using serve -s <build-directory>. If you dont’ run npx serve -s <build-directory>. Test and observe the behaviour of the site.
Failing that, find a general development forum and post a question there as this isn’t an issue with Netlify.