React/Github-pages: Failed to load resource: the server responded with a status of 404 ()

Viewed 696

I have successfully uploaded react app`s to github pages before, but this time when I try to upload a new page the code is pushed and everything looks fine in the repository, everything loads fine in the localhost. The problem is when I access the website in the console i get the error message above.

const res = await axios.get(' https://api.open5e.com/monsters/?limit=1086');

I am using this API, the limit is above 50 but I don`t believe this is the reason for the crash but I cannot think of anything else.

Website 1: (Currently redirects you to a 404 error page, as part of my attempt to solve the problem) https://ottotsuma.github.io/MonsterSearch/ Repo - Website 1: https://github.com/ottotsuma/MonsterSearch

Website 2: https://ottotsuma.github.io/MonsterApiReact/

Repo all code: https://github.com/ottotsuma/DnD-React

I also get this error in localhost and the hosted website: Uncaught TypeError: Cannot use 'in' operator to search for 'default' in undefined. But since the website was working as intended so far I have just ignored it.

I was hoping if anyone else has had a similar problem with gh-pages they might know what I have done wrong.

Kind regards,

Sheep

0 Answers
Related