I'm running firebase init
and it's creating firebase.json
. firebase.json
is in the apps root directory, pointing towards my public directory app
. See here:
firebase.json
{
"firebase": "harrison",
"public": "app",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
Here is where my firebase.json lives:
Here is my public directory, app
:
When I run firebase deploy
from the command line, everything seems to upload correctly. I then run firebase open
or equivalently go to the deploy site, and I get a 404 saying my index.html was not found when it's CLEARLY in the specified directory.
Firebase automatically creates your firebase. json file at the root of your project directory when you run the firebase init command.
You're seeing this because you've successfully setup Firebase Hosting. Now it's time to go build something extraordinary! You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
I met the same problem as yours, here is my soluation:
run firebase init
choose the host option
rewrite all to index:yes
overwrite to dist/index :no
and then firebase deploy
and then solve the problem
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With