nicholas lui nicholas lui - 1 month ago 29
JSON Question

Firebase deploy error on public key / directory

I am building an IOS app using Firebase. I have an error when I try to deploy
"Error: Specified public directory does not exist, can't deploy hosting"
I have been following the hosting guide here Guide Link But being new learner, I am not understanding what should I put in

firebase.json


So my code in
firebase.json


{
"firebase": "xxxxxx", //(my app name)
"public": "/usr/local", //(I am not sure what should i put in here)
"ignore": [
"firebase.json",
"**.*",
"**/node_modules/**"
]
}


I am not sure what should I put in
"public"
property. I think that is the reason why I get the error. I don't understand what public directory mean in here.

Answer

Easily deploy and host your app's static assets (HTML, CSS, JavaScript, etc) with our production-grade hosting service. All of your content is served over HTTPS and backed by a global CDN.

It cleary states only static thing is expected to be hosted.

In "public" you are supposed to put dist (distribution) folder distination, In web apps Its a folder that contains all assets to keep app up and running on firebase hosting service.

Above answer is to clear Concept, Provide more details of your app and structure for further help.