score:10
I had this problem too - I fixed it by configuring my app as a single page app. When you originally did firebase init
you could have selected this as an option. Now, you can do that by manually changing your firebase.json
file.
You want to add this to your firebase.json
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
so your firebase.json
will look something like this
{
"hosting": {
"target": "your-app-name",
"public": "your-build-directory",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
}
}
Source: stackoverflow.com
Related Query
- react router app hosted on firebase issues 404 error only when trying to access route via address bar
- 404 error when trying to list envelopes in react sample app
- Getting 403 ACCESS DENIED error when deploying React Web app on AWS Amplify
- React router doesn't route traffic when hosted on firebase
- 404 Error on refresh with SPA React Router app in GitHub Pages
- 404 Error when deploying React App on custom domain
- Access Denied Error from protected routes from react app hosted on AWS Amplify
- 404 when trying to enter a react app route
- Getting 403 Access Denied Errors When Hosting a React Router App in AWS S3 and CloudFront
- Create React App Error when trying to run command npx create react app: spawn UNKNOWN
- Unable to access App component when using React Router
- React Redux "Cannot read property 'status' of undefined" error when trying to access store variable
- 404 Not Found error in preflight OPTIONS when executing a PUT method in CakePHP API with axios in React App
- React Router rendering only base path (/) and throwing error for other paths when requested directly in the browser
- File not found error when trying to 'fetch' json in React App
- How to solve undefined error when trying to access a nested array in a React state variable?
- React App protected routes throw Access denied error - hosted on AWS Amplify
- I deployed my react app on firebase and I can access only route "/" from outside
- Invalid Hook Call Error when using react useState hook inside firebase app
- Error gen[0] is undefined when trying to access an object in an array with React js
- Error when trying to add timestamps to comment section for social media web app using firebase
- 403 Forbidden Error when trying to post and put a axios request in a web app using Django and React
- TypeError: Cannot read property 'then' of undefined, React app error when trying to save a playlist
- Getting 404 error when fetching service-worker on next.js + firebase hosting pwa app
- Can't resolve 'url' in node_modules error when trying to access Azure Key Vault with React
- How do I avoid 404 error in deployed react app when I refresh page?
- React router 404 error when refreshing page with url params
- Getting a 404 error when trying to get Express and React to connect
- Why do I keep receiving an error when trying to install my react app
- I get an error when trying to create a React app
More Query from same tag
- Uncaught TypeError: Super expression must either be null or a function
- Using sourceMaps with CSS Modules
- Fill Dropdown with Fetched API Items
- Using React Router with Multiple URL Segments
- Adding a line break dynamically inside a JSX expression
- Can I force a state update using a class as a value?
- Why do not add css style in my react project?
- ReactJS – Map Data with Headings/Groups
- React change selected item index of array using order number
- React is not rendering when i use react-router
- How to break down component and make sub component in reactjs?
- How to offline my Node dependencies to deploy to Artifactory?
- How to render components based on localStorage value
- Set value of Reactstrap's Input to empty string
- React Switch always going to first Route
- Using a variable that has been defined inside render, to use it inside return
- Updating the state via eventHandler
- Object property is undefined when i try to show it or console.log - React & Hooks
- Is It possible to change the property from hover to click during a specific break point using media queries in React?
- Search in the multiply tree view doesn't work properly
- How to security save Facebook response token to React app?
- Need help getting a child within a node to an array
- How can I make a file available app wide without importing it?
- How to initialize an interface from API response using TypeScript and React
- React / Express Access to fetch from Origin Blocked by CORS Policy
- Passing API response data from Redux state to component props
- React Hooks, setState not working with an async .map call
- React JS Card Game, counting values in state
- How to fix the Rendered more hooks than during the previous render using react hook
- Modifying state in React