Need help uploading to github

Idk how I am supposed to make this topic because I just joined.

Ok so I made a random project and uploaded to github. Here is link to the project Bee Swarm Simulator info - Snack (expo.dev) I uploaded it to Github here Sample Snack app | testing (neil-popper.github.io) but it isn’t showing my code’s result for some reason. Can someone help me. Also to make the code work you have to run it in the android or ios section. It won’t work on web.

Hi @nameless_gamer

Could you elaborate a bit on what you’re expecting to happen? Under what circumstances?

e.g. “I did this, followed by that, and then this. I expected the following, but instead the following happened”

It seems the react-native-table-component package doesn’t like react-native-web. If you comment out the code in your Codes.js screen then it works on the web too.

By the way, your GitHub repository is missing a lot of the code from the Snack.

1 Like

Ok

  1. I downloaded the zip of my code
  2. I unzipped the file
  3. I uploaded it to github
  4. I made a github page for it
  5. When I open the github page it shows this screen that says “Sample Snack app” Sample Snack app | testing
    I want it to show the website thing I made instead of saying " Open the App.js file to start writing some code. You can preview the changes directly on your phone or tablet by scanning the QR code or use the iOS or Android emulators. When you’re done, click Save and share the link!" I want to know what I should change to make it show my website on github.

I’ll try to make a new repository with all the code to see if that works.

edit: I made a new repository and it has all the code but it still says the same thing. Here is a link Sample Snack app | test2 (neil-popper.github.io)

The problem is GitHub is just showing you the contents of your README.md file.

You seem to be using GitHub as a place to host a static site. I’ve never used GitHub for hosting a site, so I’m perhaps not the best person to give advice about that :slight_smile:

But if you want to do that you would need to get Expo to generate the files and then upload those.
You do this with expo build:web

But read through this page for the details. It’s also got examples of how to publish the results to various hosting providers. I see they even have an example of publishing to GitHub pages! I see the GitHub pages section has a “TL;DR” summary followed by the details, so I suggest you read the “Creating a Build” section and then read the whole “GitHub pages” section before giving it a try.

Then let us know if you’re still stuck.

1 Like

Thanks! That helps a lot.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.