Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Pages shows 404 error when navigating #139

Closed
raviprakash11 opened this issue Mar 15, 2023 · 4 comments
Closed

GitHub Pages shows 404 error when navigating #139

raviprakash11 opened this issue Mar 15, 2023 · 4 comments
Assignees
Labels
awaiting-reply Awaiting an update / reply / response react-router App uses React Router

Comments

@raviprakash11
Copy link

raviprakash11 commented Mar 15, 2023

Hi @gitname,

I face this issue recently, "unable to navigate from one ui-component to another ui-component on gh pages".
My testapp is successfully navigating me from one ui component to another ui component in my local, but when i deployed my app in gh page, i don't know where it is breaking, first screen is loading successfully but when its come to anyother screen it is throwing 404 error .

testapp url - https://raviprakash11.github.io/elocution/

Please help me on this !
Thanks in Advance.

@gitname
Copy link
Owner

gitname commented Mar 15, 2023

Hi @raviprakash11, since routing is working when served by your local machine, but not when deployed to GitHub Pages, I think you are encountering the limitation of GitHub Pages described here; i.e.

GitHub Pages doesn’t support routers that use the HTML5 pushState history API under the hood (for example, React Router using browserHistory).

I recommend applying one of the two workarounds described in the following comment (which is based upon the article linked in the previous paragraph): #104 (comment)

Please let us know (i.e. me and future readers) what you end up trying and whether it fixes the issue.

@gitname gitname self-assigned this Mar 15, 2023
@gitname gitname added react-router App uses React Router awaiting-reply Awaiting an update / reply / response labels Mar 15, 2023
@raviprakash11
Copy link
Author

Hi @gitname ,

I appreciate for quick response. Sure, I'll check and get back to you.

Thanks.

@gitname gitname changed the title [router-failure]:unable to navigate from one ui-component to another ui-component on gh pages GitHub Pages shows 404 error when navigating Mar 16, 2023
@raviprakash11
Copy link
Author

Hi @gitname ,

I modified my router file as per your last comment.
#104 (comment)

Now, it is working fine. Hence, closing this issue.

Thanks.

@gitname
Copy link
Owner

gitname commented Mar 18, 2023

Glad it's working! Thank for following up and closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-reply Awaiting an update / reply / response react-router App uses React Router
Projects
None yet
Development

No branches or pull requests

2 participants