gitname / react-gh-pages

Deploying a React App (created using create-react-app) to GitHub Pages
6.47k stars 913 forks source link

Github Pages Failed to load resource: The server responded with a status of 404 () #160

Closed yakubhariana70 closed 1 year ago

yakubhariana70 commented 1 year ago

Hey Guys, I need some insight and hope you kindly want to help me solve my problem with gh-pages. I developed a webpage using CRA, React Router, and some npm packages like react-map-gl, react-bootstrap, etc. I think my project going well as I see in the development build everything looks OK.

When I built my app on Github pages something happened. My app only shows the homepage, and when I navigate to the other page it tells me 404 There isn't a GitHub Pages site here. The console showed me an error Failed to load resource: The server responded with a status of 404 (). However, when I run in the development build the page is running smoothly.

Links

Below there is my code and deployed pages

Everything Else

This is the homepage: image This is the other page should be: image

And this is the error I get: image

yakubhariana70 commented 1 year ago

The console log shows me this error image

yakubhariana70 commented 1 year ago

I already solved this problem. The problem was mainly caused by my routing which was not correctly scripted. Thankyou