question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Css is not loading properly in build

See original GitHub issue

🐛 Bug Report

I want to deploy the build folder, but the build folder css is all messed up. The pages has no styling. When I’m running in development mode the pages are loading fine, but in build mode, pages are not loading properly. Please see attached photos

Have you read the Contributing Guidelines on issues?

Yes

To Reproduce

  1. Clone the repo git clone https://github.com/react-native-bootstrap/react-native-bootstrap
  2. cd into website folder cd website
  3. Start development server and see website is working fine yarn start
  4. Not build the static website & open index.html in build folder yarn build

Expected behavior

The website should have looked like this

Screenshot_2020-05-31 React Native Bootstrap React Native Bootstrap(1)

Running index.html file from build folder should have worked fine, so that I can deploy it on github pages

Actual Behavior

Website looks like this after deploying build folder in gh-pages

Screenshot_2020-05-31 React Native Bootstrap React Native Bootstrap

Your Environment

  • Docusaurus version used: 2.0.0-alpha.56
  • Firefox 76.0.1 (64-bit)
  • Node.js v10.15.3
  • Operating system and version (desktop or mobile): Ubuntu 18.04

Reproducible Demo

The entire code is present here https://github.com/react-native-bootstrap/react-native-bootstrap/tree/master/website

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
iamadityaccommented, May 1, 2021

Hi @sanjeevyadavIT ,

I have the same issue as you, Have you got any solution to it?

Also Just want to know, After running yarn build can we run a static website through a browser without running any server?

0reactions
slorbercommented, Oct 26, 2022

It is impossible to help without seeing your live site with the exact URL it’s being served on.

As stated above it is likely a baseUrl configuration issue, but can be many different things in practice

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML not loading CSS file - Stack Overflow
HTML not loading CSS file · Are both files in the same directory? Can you access both files by simply changing the filename...
Read more >
How to Troubleshoot CSS Not Working - WPForms
There are a few common issues that can cause CSS not to appear correctly on a site. In this tutorial, we'll walk through...
Read more >
How to Fix CSS file is not Working with HTML in Chrome
Fix CSS file is not Working with HTML in Chrome | Problem Solved Show SupportBuy Me a COFFEE: https://buymeacoffee.com/Webjahin  ...
Read more >
Solving the React Error: Not Picking Up CSS Style | Pluralsight
CSS helps in styling webpages, but sometimes code may not get properly imported or may show a few errors while it is being...
Read more >
CSS not loading? - Netlify Support Forums
Did you resolve the issue? If you are still seeing CSS issues, please let us know. If so, my best guess is that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found