Hello! I’m having a similar 404 error issue, But my application works locally! It routes fine when visiting the home homepage ’ / ’ or the about us ‘/#about’ nav menu link both in the top nav in the ‘Header.js’ component and the ‘Footer.js’ component at the bottom, which is really just an ID on the homepage. that scrolls to a specific component like 70% of the way towards the bottom of the homepage. This Is definitely a bit novice in the setup but I need to figure out why it can’t work on Netlify! Can anyone spot an obvious error I’ve made?
Here’s my re-directs ( netlify.toml netlify.toml in the root:
[[redirects]]
from = “/menu/*”
to = “/menu”
status = 200
[[redirects]]
from = “/bookings/*”
to = “/bookings”
status = 200
here’s my GH whole repo: GitHub - jonathanschimpf/front-end-capstone-meta-x-coursera
here’s the hosted Netlify with the issue:
coming from : https://app.netlify.com/sites/eclectic-hamster-d94ef6/overview
** the package.json** ( package.json :
{
“name”: “front-end-capstone-meta-x-coursera”,
“version”: “0.1.0”,
“private”: true,
“dependencies”: {
“@fortawesome/fontawesome-svg-core”: “^6.3.0”,
“@fortawesome/free-brands-svg-icons”: “^6.3.0”,
“@fortawesome/free-regular-svg-icons”: “^6.3.0”,
“@fortawesome/free-solid-svg-icons”: “^6.3.0”,
“@fortawesome/react-fontawesome”: “^0.2.0”,
“@testing-library/jest-dom”: “^5.16.5”,
“@testing-library/react”: “^13.4.0”,
“@testing-library/user-event”: “^13.5.0”,
“modern-normalize”: “^1.1.0”,
“react”: “^18.2.0”,
“react-dom”: “^18.2.0”,
“react-router-dom”: “^6.8.2”,
“react-router-hash-link”: “^2.4.3”,
“react-scripts”: “5.0.1”,
“react-scroll”: “^1.8.9”,
“web-vitals”: “^2.1.4”
},
“scripts”: {
“start”: “react-scripts start”,
“build”: “react-scripts build”,
“test”: “react-scripts test”,
“eject”: “react-scripts eject”
},
“eslintConfig”: {
“extends”: [
“react-app”,
“react-app/jest”
]
},
“browserslist”: {
“production”: [
“>0.2%”,
“not dead”,
“not op_mini all”
],
“development”: [
“last 1 chrome version”,
“last 1 firefox version”,
“last 1 safari version”
]
}
}
What am i doing wrong? First time truly trying to host something on Netlify. What should i change?
Thanks in advance! Love the ease of setup, but just stuck on this! wondering if the [[redirects]] are fouled up!?