Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

firebase deploy error and fiebase.json empty file

I'm following this tutorial Getting Started with Firebase Hosting on the Web - Firecasts

I'm trying to host a simple index.html file in firebase but when I type firebase deploy its gives me the following error:

No targets found. Valid targets are: database,storage,functions,hosting. hosting error image

I found my firebase.json file is empty it contains only { } .

like image 660
smit patel Avatar asked Jun 02 '17 07:06

smit patel


2 Answers

run firebase init again.

When you are asked for - Which Firebase CLI features do you want to setup for this folder?

Press Space to select features, it will mark that feature with asterisk.

Then Enter to confirm your choices.

Make sure you select the options by pressing spacebar, then press enter.

like image 118
Amresh Avatar answered Oct 26 '22 11:10

Amresh


run firebase init and if your firebase.json is empty with only {} then add

 {
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ]
  }
}

replace "public": "app" with "public": "public"

then run firebase deploy

like image 40
niranjan pb Avatar answered Oct 26 '22 10:10

niranjan pb