nicholas lui nicholas lui - 9 months ago 134
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


So my code in

"firebase": "xxxxxx", //(my app name)
"public": "/usr/local", //(I am not sure what should i put in here)
"ignore": [

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

Answer Source

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.