0

A react web page (not static) hosted through github hosting and the webpage is hosted correctly, the html page with background color is visible in the link. But the other files inside src folder is not hosted at all.Is it because the files are not injected to the root properly ?[after hosting only index and style is visible, no information about src folder and its filesindex.js file total files and folders

I have changed "private": to true from false, still not helping. After going through create-react-app-dev , changed the deploy script , still not working. package.json

gh-pagesgh-page

when hosting the website with localhost, its completely working.local host

but on github hosting , only background plain color is visible , none of the other modules are visible, not even in console.

Someone, please help , kinda struck on this for ever....Thanks.

Ochaoash
  • 121
  • 1
  • 1
  • 10
  • 1
    Instead of pictures of code please edit the post to include properly formatted and readable code snippets. Images are not searchable and can be more difficult to read. See [mcve]. I'm guessing you (1) have an improper `homepage` entry in the package.json file and/or (2) are not using a `HashRouter` for routing/navigation. Does this help answer your question? https://stackoverflow.com/a/71985764/8690857 – Drew Reese Jul 07 '22 at 06:04
  • sorry, thought images would help understand the problem better. The homepage was entered by myself during the process to host this on github. And I'm not using any routing since I'm completely new to front end development, in learning phase now.But I have watched experts doing it on youtube, and followed it , still not working properly, index.html page is visible, but nothing else. – Ochaoash Jul 07 '22 at 06:13
  • Oh, but you tagged your post with `react-router`. You are not using any routers and routes? Do you see anything of your React app in the DOM? Can you share your React code? – Drew Reese Jul 07 '22 at 06:17
  • You have to build the app before hosting it on github pages. – Konrad Jul 10 '22 at 22:48
  • I have already build the app before hosting – Ochaoash Jul 13 '22 at 08:23

0 Answers0