Deploying site from GitHub Repo and not working (Failed to load resource: the server responded with a status of 404 ())

Site name: ewan-stott-portfolio-deploy2

Description: My site is working on github hosting (here: Ewan Stott). Now trying to host on Netlify, and site says successfully published, but does not load.

Github repo here: GitHub - ewanstott/home: Personal website/portfolio. Built using React and Bootstrap.

Console Errors:
main.fe927caf.css:1
Failed to load resource: the server responded with a status of 404 ()
main.70b145b7.js:1

   Failed to load resource: the server responded with a status of 404 ()

manifest.json:1

   Failed to load resource: the server responded with a status of 404 ()

manifest.json:1 Manifest: Line: 1, column: 1, Syntax error.
main.fe927caf.css:1

   Failed to load resource: the server responded with a status of 404 ()

manifest.json:1

   Failed to load resource: the server responded with a status of 404 ()

Thanks in advance

@ewanstott Your issue is common for people that initially host on GitHub then try to host on Netlify.

On GitHub you’re producing the site so it’s hosted in a sub-folder, but on Netlify you’re deploying that folder to the root.

If you view source on the page you will see all your asset paths begin with /home/:

The files don’t exist in /home/:
https://ewan-stott-portfolio-deploy2.netlify.app/home/static/js/main.70b145b7.js

They exist here:
https://ewan-stott-portfolio-deploy2.netlify.app/static/js/main.70b145b7.js

If you run your build locally with npm run build you will see a note that your output has been created to be hosted at /home/ and that you can adjust it with the homepage value in your package.json.

Since you want to host from / on Netlify, just delete the entire homepage declaration in your package.json:

1 Like