404 error and other errors when deploying github pages - reactjs

I am trying to deploy my portfolio website built with react. I am using github pages to deploy the page.
This is the website I used when I got a 404 error in deploying. https://github.com/orgs/community/discussions/23058
This is the website I am trying to deploy: https://shivam242001.github.io/
On opening the site I initially see the 404 error in the console and when I click refresh I see this in the console
This is the git repo: https://github.com/Shivam242001/Shivam242001.github.io
I really need some help, I have been stuck on this for way too long. Thanks in advance

Because you set the wrong home page
"homepage": "https://github.com/Shivam242001/website.git"
It should be
"homepage": "https://shivam242001.github.io"
Please refer to this: https://github.com/gitname/react-gh-pages#4-add-a-homepage-property-to-the-packagejson-file

Related

Publishing React website on GitHub pages produces a blank page

So I've managed to publish my React app to GitHub pages, but the page shows up blank. There are no known errors that I can tell as of now. Here is a link to the master branch: https://github.com/SarahACollins/Portfolio/tree/master and to the website https://sarahacollins.github.io/Portfolio/ . I am building the site from the gh-pages branch; I'm not sure if I'm supposed to but if I build the website from the master branch, I receive a 404 error where the page is just not found. Any help would be appreciated. Thanks.
GitHub Pages screenshot

Netlify Not Rendering React Component

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?

Netlify site publishing but blank screen

I have created a site using CRA, If I run build it all works fine on Github-pages, but when I attempt to run the site through my Netlify account it shows up a blank page. It's connecting to the site as the html is showing with my React page. but there is no content. The Repo in Github has a client folder in which is my build folder. I have tried everything to get this working, am I missing something simple?
This is my Package.json file:
My Netlify settings point to the correct directory:
There is also a 404 error showing when the page loads:
I changed the homepage of my package.json file to "." and then on netlify changed the settings to not see npm warnings as errors which I think was blocking the site compiling. This was done by adding CI=false on the build command on netlify.
Everything is now working

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/.

How do I deploy a react website to github pages?

I've tried following the github documentation and this video tutorial to a T https://www.youtube.com/watch?v=Dq6EkzoZp4w and yet when ever I try and visit my site I simply get a 404 error, this a link to the gh-page repo https://github.com/Jseto97/jseto.me/tree/gh-pages. Not sure what i'm doing wrong.
check this, it is very good tutorial to deploy react app on github pages https://medium.freecodecamp.org/surge-vs-github-pages-deploying-a-create-react-app-project-c0ecbf317089

Resources