0

I tried deploying my backend to Heroku and after I did that my website was still working on http://localhost:3000/ but after I build the app for deployment on GitHub Pages the website stopped working on the Github page but works on the local environment.

this is my GitHub repo: https://github.com/pranjalchaplot/missedmessage/

My deployed GitHub Page (doesn't work): https://pranjalchaplot.github.io/missedmessage/

  • In your client folder, regenerate your static files with `npm build` and commit those files on your `gh-pages` branch. – Tin Nguyen Feb 10 '21 at 08:32
  • @TinNguyen tried that but it's not working, I changed the homepage in the package.json to my GitHub pages deployed link still it's not working after building it again and committing the changes to gh-page branch – Pranjal Chaplot Feb 10 '21 at 09:09

1 Answers1

0

Your JavaScript references are not set correctly as seen in your html javascript references, when you open that in a new tab, it feeds off of the "master" url, and brings you to a 404 page, you need to fix/change your reference path.

Also, the console is showing quite a few errors

Nimantha
  • 6,405
  • 6
  • 28
  • 69
TheGuy920
  • 9
  • 8
  • Thanks for your answer but can you please elaborate what to change in the script reference to and how to change the reference path?? Which index.html file I should change in? the one in the build folder or the one in the public folder? and change the location of the script to where? – Pranjal Chaplot Feb 10 '21 at 08:03
  • your JavaScript is running back-end correct, on heroku? because the JS reference path leads to nothing, just change the reference path to the location of the JS on heroku. So for example `https://myapp.herokuapp.com/js/my.js` – TheGuy920 Feb 10 '21 at 16:21