Receiving "Failed to load resource : the server responded... 404

I deployed my ecommerce app, it works fine in the build, but when deployed with netlify the live link is receiving a “Failed to load resource: the server responded with a status of 404 ()”

Link: https://fanciful-truffle-5466e5.netlify.app/

This is my first time troubleshooting a deployed website, so suggestions on how to approach troubleshooting are much appreciated.

For reference, here is my package.json:

{
  "name": "ecomm",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@material-ui/core": "^4.11.3",
    "@stripe/react-stripe-js": "^1.2.2",
    "@stripe/stripe-js": "^1.12.1",
    "axios": "^0.21.1",
    "babel-polyfill": "^6.26.0",
    "body-parser": "^1.19.0",
    "bootstrap": "^4.5.3",
    "dotenv": "^8.2.0",
    "express": "^4.17.1",
    "gsap": "^3.6.1",
    "history": "^5.0.0",
    "parcel": "^1.12.4",
    "parcel-bundler": "^1.12.4",
    "react": "^17.0.1",
    "react-bootstrap": "^1.4.3",
    "react-dom": "^17.0.1",
    "react-hook-form": "^6.15.1",
    "react-router-dom": "^5.2.0",
    "react-scripts": "2.1.8",
    "react-stripe-checkout": "^2.6.3",
    "react-stripe-elements": "^6.1.2",
    "stripe": "^8.135.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "CI= react-scripts build",
    "test": "react-scripts test --env=jsdom",
    "eject": "react-scripts eject"
  },
  "description": "This project was bootstrapped with [Create React App](https://github.com/facebookincubator/create-react-app).",
  "main": "index.js",
  "devDependencies": {},
  "repository": {
    "type": "git",
    "url": "git+https://github.com/alexnbuchanan/ecommerce.git"
  },
  "keywords": [],
  "author": "",
  "license": "ISC",
  "bugs": {
    "url": "https://github.com/alexnbuchanan/ecommerce/issues"
  },
  "homepage": "https://github.com/alexnbuchanan/ecommerce#readme",
  "browserslist": [
    ">0.2%",
    "not dead",
    "not ie <= 11",
    "not op_mini all"
  ]
}

Hello @ab99, sorry to hear you are having trouble deploying your website.

The line above is adding /alexnbuchanan/ecommerce/ to your build path.

Remove the line above from your package.json file and then redeploy again to see if it works.

If you are going to include a homepage value, make sure it is the same as your site URL.

In your case the value should be:

  "homepage": " https://fanciful-truffle-5466e5.netlify.app",

Note: Typically, leave this setting out of the file until you are live and have your domain set.

Hope this helps.

2 Likes

Wow that worked, much appreciated!

1 Like

Thanks for the thorough explanation, @clarnx. This is awesome!

1 Like

You are welcome @hillary. I’m glad I was able to help.

1 Like