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
perry
July 31, 2020, 4:40pm
2
Hi there,
Did you see this guide yet? This is the best place to start for “Page Not Found” issues.
Last reviewed by Netlify Support - August, 2023
Netlify attempts to lookup a file based on several xor filters, and when all of these fail, we end up serving a 404 page. For example, a request made to /example/ would check /example/index.html, /example.html, /example/home.html and several other combinations (not necessarily in the same order) before hitting the 404. However, in case you were not expecting a 404 at a particular URL, you might be interested in finding out the reason and potentia…
This Support Guide contains a ton of useful debugging tips that can likely help you solve your problem
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!
Scott
August 2, 2020, 10:07pm
4
Hey @wondasom ,
Did the above advice help?
Hi there,
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!
Scott
August 3, 2020, 12:53pm
6
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.