404 after successful deployment

  • My site name is https://reditofind.netlify.app
  • I wanted to publish ‘restaurant-finder’ directory that is in ‘redi-FinalProject’
  • In Build Settings, I changed my publish directory to ‘restaurant-finder’ → failed
  • In Build Settings, I changed my base directory to ‘restaurant-finder’ → deploy success with 404 error
  • Currently, in my package.json, scripts.build = “CI= react-scripts build”

Here is my published deploy log

Looking for a tip or a solution from the community!
Thank you in advance :slight_smile:

Hi there,

Did you see this guide yet? This is the best place to start for “Page Not Found” issues.

This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem :slight_smile:

We also recommend trying to search the forums with the build error you encountered - it’s likely your question was already asked by someone else!

If you are still having problems, please provide as much information as you can on what you have already tried, what your build settings are, your package.json, etc. Thanks!

Hey @wondasom,

Did the above advice help?

Hi there,

  1. I downloaded the copy of the deploy and it seemed alright to me.
    All the files I worked on were there.

As I mentioned earlier,
2. When I change my Publish directory, deploy fails
3. When I change my Base directory, deploy succeeds with 404 errors

Below is my package.json

{
  "name": "restaurant-finder",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.2.1",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-dropdown": "^1.7.0",
"react-onclickoutside": "^6.9.0",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"react-scripts": "3.4.1",
"react-select": "^3.1.0",
"styled-components": "^5.1.1"
  },
  "scripts": {
"start": "react-scripts start",
"build": "CI= react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
  },
  "eslintConfig": {
"extends": "react-app"
  },
  "browserslist": {
"production": [
  ">0.2%",
  "not dead",
  "not op_mini all"
],
"development": [
  "last 1 chrome version",
  "last 1 firefox version",
  "last 1 safari version"
]
  }
}

Thanks!

Hey @wondasom,

The definitions for each of these directories can be found in the aforementioned link. Your base directory may be / (if your package.json is in /, for example) and your base directory will be where your index.html is.