Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'firebase deploy' Error - Must supply a public directory using "public" in each "hosting" config

I am receiving the error 'Must supply a public directory using "public" in each "hosting" config.' when deploying my firebase app. How do I fix this?

like image 278
nate Avatar asked Apr 15 '20 21:04

nate


2 Answers

I was using "public: "" to deploy the root directory. When it forced me to use a value I instead passed "public": "." which worked.

like image 53
TMob Avatar answered Sep 27 '22 20:09

TMob


Got the same error and fixed it with adding "public" to firebase.json in the empty "public" attribute.

Your firebase.json should be like this.

"hosting": {
  "public": "public", // <- Added
  "ignore": [
    "firebase.json",
    "**/.*",
    "**/node_modules/**"
  ]
}
like image 41
kei Avatar answered Sep 27 '22 20:09

kei