I read 2 previous similar questions on this website but nothing helped me. Please help me I have an error 404 on Github Pages when I reload my page, on live server everything is okay. https://bogdangapon.github.io/pixabay-api/ - github page; https://github.com/BogdanGapon/pixabay-api/tree/gh-pages - my repo I already read this article https://github.com/rafgraph/spa-github-pages#readme about React Browser and GitHub Pages but it did not help me
Asked
Active
Viewed 40 times
-1
-
1GitHub pages are not useful for reactjs project i recommend you to use `Vercel` or `Netlify` or `Cyclic.sh` website for hosting – Kannu Mandora Jul 16 '23 at 04:10
-
Set pathSegmentsToKeep to 1 in the 404.html file in order to keep /repo-name in the path after the redirect This is the main problem and it fix the problem for everybody who will see this question use this to change it from 0 to 1 and this guide 100% help you to deploy. – Богдан Гапоненко Jul 16 '23 at 04:33
-
Does this help answer your question? https://stackoverflow.com/a/71985764/8690857 If not, then please [edit] the post to include actual details about what you are trying to do and what the specific issue is, and what you have tried on your own to resolve it. We can't help address issues with code we can't see or details how you are building and deploying your app. – Drew Reese Jul 16 '23 at 18:56
1 Answers
1
Github page support only non-build project like HTML/CSS/Javascript. If you execute your ReactJS project, you can use netlify.com.

Dev Conductor
- 179
- 2
- 9