Some css stylings are automatically applied on hosting

Hi there… I deployed a react js project. The view is perfectly fine in the local. After the deploy in free tyre some css are automatically applied and whole site is getting distorted.
Please if some could help me with this I would be very thankful.

Hey @vedanthikarthik

In order to offer assistance, you will need to share the site name.
If you can share the repository you are deploying from, that could help too.

Hello @coelmay . Thanks for the response!.

repo - GitHub - VedanthiKarthik/flowline: Website for Flowline Engineers using React JS

When the site first loads, the home <div> looks like this:

<div id="home" class="jss1">

However, after navigating to products/services and pressing the back button it looks like

<div id="home" class="jss58">

The class changes.

This happens on the navigation elements as well. I can’t tell where the classes are coming from or why they are changing.

Is this when you are running npm run start (or react-scripts start)? Have you tried running npm run build to see the production output? Does it look the same when you build locally as it does on Netlify?

@coelmay yes, I tried with “npm run build” I am facing the same issue and same distorted view. With “npm start” the view is pretty much fine as expected. Any suggestion would help me a lot.

If you’re seeing the same thing in a local build, then it is not something Netlify-specific.

I have looked through the repository, but have nothing I can add in the way of assistance from that.

Hi, @vedanthikarthik. I want to be clear that your question is welcome here but it isn’t actually a question about Netlify.

The issue is caused by the code in your repo. Our support team only has resources to troubleshoot the code that Netlify writes. As we didn’t write the code causing this issue we will not be able to assist with fixing it.

Again, though, someone else on this forum might have time to answer and you are welcome to ask this question here. It might also help to asking this in another forum dedicated to troubleshooting React sites or on a general troubleshooting site like StackOverflow.

Thanks @coelmay @luke for the assistance. As I am a beginner to the production. I had no idea of build. As I got to know where the issue is, I could try and fix it
Thanks again!!

1 Like