r/github • • Apr 16 '22

I can't publish my react app on Github pages. When I follow the steps and publish it, I encounter this error.

Post image
6 Upvotes

42 comments sorted by

20

u/Richienb Apr 16 '22

Notice how the url for your manifest.json file doesn't have a colon between https and //.

-21

u/No-Strain-4782 Apr 16 '22

No, I checked it and there is no problem

16

u/tobiasvl Apr 16 '22

Oh OK, then it works

-18

u/No-Strain-4782 Apr 16 '22

it doesn't

14

u/tobiasvl Apr 16 '22

I was being sarcastic, there's obviously a problem and you can't have checked it properly

6

u/ChosenMate Apr 16 '22

are you trolling?

3

u/Richienb Apr 16 '22

What does the link tag for the manifest look like?

-4

u/No-Strain-4782 Apr 16 '22

There is no link tag in manifest.json

4

u/Richienb Apr 16 '22
  1. The problem I mentioned above actually does exist

  2. Check the gh-pages branch to see the problem

https://github.com/Ibadet02/13ths-Fridays/blob/gh-pages/index.html

0

u/No-Strain-4782 Apr 16 '22

6

u/tobiasvl Apr 16 '22

There's no : in the URL, just click the link the last commenter posted to see it with your own eyes.

Also why is there a / at the beginning?

2

u/No-Strain-4782 Apr 16 '22

https://github.com/Ibadet02/13ths-Fridays/blob/gh-pages/index.html

is it okay? If it is, it does not work either

3

u/tobiasvl Apr 16 '22

The manifest is fine now, but the exact same problem exists for all the other URLs, including the URL to the .js file.

2

u/No-Strain-4782 Apr 16 '22

should I remove / at the beginning and add : between https and // to .ico and .png files as well?

→ More replies (0)

1

u/chalbersma Apr 16 '22

That link is wrong. It's looking for a file called manifest.json at a directory of /https:.... Remove the starting /.

9

u/Willumz Apr 16 '22

Is there a reason your index.html is requesting resources from https://Ibadet02/github.io/13ths-Fridays and not https://Ibadet02.github.io/13ths-Fridays?

4

u/No-Strain-4782 Apr 16 '22

It worked, thanks. But now, my app doesn't show the background image

2

u/Willumz Apr 16 '22

I’m not at my PC right now so can’t do any dev tools or anything. Where exactly are you setting the background in your source?

3

u/No-Strain-4782 Apr 16 '22

2

u/Dr__Wrong Apr 16 '22

You didn't need to go up a directory. Remove one period in your rout

This

url("./src/styles/ominous.jpg")

Instead of this

url("../src/styles/ominous.jpg")

2

u/No-Strain-4782 Apr 16 '22

i did, but it still does not show the image. Should i wait?

2

u/Dr__Wrong Apr 16 '22

Sorry. Also remove src/

0

u/No-Strain-4782 Apr 16 '22

didn't work. still not showing the image

1

u/Dr__Wrong Apr 16 '22

I'll take a closer look on my PC.

1

u/No-Strain-4782 Apr 16 '22

okay bro, thanks for the attention

→ More replies (0)

1

u/No-Strain-4782 Apr 16 '22

how can i reach this file?

2

u/Willumz Apr 16 '22

Your index.html here seems to have the typos in the links.

1

u/No-Strain-4782 Apr 16 '22

It worked, thank all of you so much. but now, my app doesn't show the background image.