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
- Clone the repo
git clone https://github.com/react-native-bootstrap/react-native-bootstrap
- cd into website folder
cd website
- Start development server and see website is working fine
yarn start
- Not build the static website & open
index.html
in build folderyarn build
Expected behavior
The website should have looked like this
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
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:
- Created 3 years ago
- Comments:14 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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?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