I'm working on a project and need to submit through github pages, however, when I upload my project, some of my JS files doesn't load and consoles an error message of Get net::ERR_ABORTED 404.
I have my JS linked <script src="src/menuList/CategoriesController.js"</script>
and this is the masseg
enter image description here
and this is my repositories link enter link description here
and this link is the page it self enter link description here
if someone can help I will be more than thankful Thanks in advance
CodePudding user response:
This usually happens when you have uppercase directories. For example take the current link for itemsController.js which is https://rashad-harun.github.io/Module_4_solution/src/menulist/itemsController.js, this gives you 404 since the menuList
directory is referred to as menulist
. If you change that link to https://rashad-harun.github.io/Module_4_solution/src/menuList/itemsController.js where I just capitalized the l
letter of the menulist
word it works.
So my suggestion is to make the sub directory names lowercase. For example:
- Rename the
menuList
directory tomenulist
in your GitHub repo.