Skip to content

GitHub page blank after deploy: Failed to load resource: the server responded with a status of 404 #23058

Answered by jiayibao
jiayibao asked this question in General
GitHub page blank after deploy: Failed to load resource: the server responded with a status of 404 #23058
Mar 9, 2019 · 19 answers · 1 reply

Hi All, 

I tried to build a personal website following a template and the website worked perfectly locally. However, after I deployed it to GitHub Pages, I can only see a blank page. I checked the Javascript console and here is the error message: 

https://jiayibao.github.io/https://jiayibao.github.io/personal-site//main-1d41357ad301d064dcf9.min.js 

Failed to load resource: the server responded with a status of 404 ()

Does anyone have any clue why “https://jiayibao.github.io” is repeated twice in loading the resource? Here is my github repository: https://github.com/jiayibao/personal-site/

And here is the personal webpage that is currently showing blank: https://jiayibao.github.io/personal-site/

My suspect that the error has something to do with path, but I’m not really sure about how to fix it. Any help would be greatly appreciated! Thank you!

Thanks! In fact, this problem has been solved by the person who provided me the inital website template. Thanks for the input! 

Replies

19 suggested answers
·
1 reply

Hi @jiayibao,

Thanks for being here! To have your repository show up at https://username.github.io/your-repository, you need to setup GitHub Pages for that repository as well. Ie: your repo should be USERNAME.github.io and its URL  ( https://github.com/USERNAME/USERNAME.github.io ).

I hope this helps!

0 replies

Thanks! In fact, this problem has been solved by the person who provided me the inital website template. Thanks for the input! 

0 replies
Answer selected

hey, please help me as I am facing the same problem as yours.

1 reply
@Chauhdri

I have changed private to false in Package.json. This change loads my website instead of blank page.

thanks alot you saved my life.

0 replies

Can you please share the solution with us? Even though my name is not getting repeated in the HTTP request link but I feel I am facing a similar issue as you did. :slight_smile:

0 replies

I am also facing same problem, this is my website in react https://meghanar121.github.io/covid-19/

0 replies

@meghanar121 can you please suggest solution for this…? even i am facing same problem…

0 replies

@sjPrajwal this was react app i made mistake in package.json file, homepage should have proper address
you can follow steps for deploying react app here:https://github.com/gitname/react-gh-pages/tree/master

0 replies

@AndreaGriffiths11 GitHub Pages is already configured. But it is showing loading error.

PF the below attachments.
hosted site

0 replies

@AndreaGriffiths11 github page configuration.

0 replies

I resolved that problem, try it: go to index.html in your compiled code, for example in Angular is “dist/index.html” and paste that: if you already have it, then delete and replace that line.

0 replies

Not sure why, but this worked for me: setting the GitHub Pages source to a different branch and then setting it back to the gh-pages branch (or whatever branch you deployed to).

0 replies

Hi
I am getting the same error in my angular app, can you please provide the step to resolve it ?

application link
https://gajananvs.github.io/Demo/

Thanks
Gajanan

0 replies

This looks like it might be a case sensitivity issue. Your Pages site is hosted from a repository called Demo but your base tag is set to demo with a lowercase d:

<base href="https://GajananVS.github.io/demo/">

Can you try setting this to t he following instead and seeing if it makes a difference?

<base href="https://GajananVS.github.io/Demo/">
0 replies

I also had the same kind of issue.
Instead of I wrote .
I changed it to and it worked.

0 replies

I had the same issue too. I just started react (newbie on react). Here is how I fixed it.

I went into the index.html file that I uploaded (aside from the fact that github made it so difficult and not user friendly to upload) I simply used the web edit on github and made live changes.
For my case: my page is username.github.io/Home (Home is my repository)
I’ve noticed that when I compiled my react page, it didnt know Home is part of the file directory for my css and js files. Therefore I had to find all the places where it uses

link href="/static/css/main.a124****.chunk.css" or script src="/static/js/2.22a******.chunk.js
and simply add /Home infront.

Therefore,
link href="/Home/static/css/main.a124****.chunk.css" and script src="/Home/static/js/2.22a******.chunk.js

And where ever your code calls js or css or whatever, you will need to add your repo name infront.

Good luck if you have a huge website. Maybe you should add before uploading

0 replies

This worked for angular as well just added repo link and added repo name infront of js files

0 replies

I solved this issue. It was very simple … but I tried more than 3 hours 🤣
you just do that

link href="./Home/static/css/main.a124****.chunk.css" 
src="./static/js/2.22a******.chunk.js

just dot before /

0 replies

Just in case someone is still having the same problem. I replaced https with http in the homepage property in package.json, and then it just works.

0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
General
Labels
None yet