Netlify Not Rendering React Component - reactjs

Here is the link to my React project https://github.com/Count-T/blogfrontend, I ran npm run build and put that folder into netlify but when I check the app it only shows a blank page. I don't know is the problem is react-router but I already put a file to redirect netlify to index.html. This is my second time uploading a project onto netlify but my previous project did not use react-router-dom. Any help would be much appreciated thanks!
Link to netlify website: https://tonyliblog.netlify.app/
Here is an image of the website

I do see an error "Cannot convert undefined or null to object" in the console on the netlify site. I don't know if that could help you to pin down the issue. Did it run without any problem in your local env? Are you using any environment variables/ Keys to access your API?

Related

i made first react app and when i upload it on github i only see blank page on github page

hi so im trying to upload page made in react to github at start i ran into problem of it showing me only README file but i managed to solve that by following deployment guide on react website and that help well kind of, now i ran into other problem which is that github is just showing me blank page i don't understand why is it like this cuz i changed file and it shouldn't be empty and here is git repository for non- npm build version of page and also here is git repo for the build version of page that is just blank, am i running in this problem cuz i used npm build wrong way? how do i fix it? thanks in advance
I had the same problem and I found easier to use Netlify to upload websites.
I think if you are using only an html file you can just set the github pages with root and it shouldn't reuqire to use build run, I think the build command it is for projects done with frameworks/more complext. Try to do like that maybe it will work.

Why isn't my React app deploying on GitHub

I'm trying to publish a react app I build on VS code, but it's not working. I followed this tutorial (https://github.com/gitname/react-gh-pages) but I can't access it at the address, I get 404. Here's my repo I'm trying use https://github.com/LazaroFilm/markdown-previewer
If you mean getting 404 on Github Pages, then be a little patient since it takes some time for github pages to show your demo
SOLVED. I needed to set the default branch in my GitHub repo settings.

When using Github pages and React how do you deploy to the homepage, i.e. https://username.github.io/?

All the examples I see online have you deploy to a subdomain (for example https://username.github.io/my-app). But how do you deploy to the homepage when using React? In my package.json file I have "homepage": "http://username.github.io/" and I'm using npm run deploy however my site doesn't show up, instead a React information file displays.
Any help would be greatly appreciated.
I figured out what I need to do after reading the 'Github Pages' section of this website: https://create-react-app.dev/docs/deployment/.

Page Not Found 404 Error is Coming when pages are refreshed..................i deployed my app on git hub

enter image description here
while deploying my Reactjs app on GitHub I am facing page refresh problem, however, on localhost app is working fine, pages are refreshed and get the component.
it seems that this is a project build problem.
I need a solution for it that why this problem is coming on project build.
Also, I did not install my packages using --save flag, I am confused about that flag options.

ReactJS Build returns empty page

I am trying to deploy my React app that I created on Firebase hosting. But the problem is that when I run the npm run build command it builds the project correctly but when I open index.html it returns empty page. What should I do?
Please, find this empty page here: https://tutorm-db33prg.firebaseapp.com
It seems as it's not importing the main.js file but I don't know if that's the problem?
Thank you in advance!

Resources