Firebase deploy could not locate firebase.json
Asked Answered
S

4

30

so, im a newbie in programming and still learning some stuff (i use windows btw)

i try to make an app, connect it to firebase. after setting up everything its time to setting the CLI

good news : i successfully setting up everything from node to nvm untill sucessfully launch the login in CLI.

bad news : right after successfully logn the CLI, im trying to type in the cmd

firebase deploy --only function

and this error appear

Error: not in a Firebase app directory (could not locate firebase.json)

i already search the web for the solution but i found nothing

can someone tell me did i miss something ? thanks.

Shoemake answered 15/10, 2018 at 16:13 Comment(3)
have you done: "firebase init" yet?Zosema
Without the exact list of instructions that you followed to get to this point, we can only speculate. The detail should be great enough that anyone can reproduce the error you're seeing.Olethea
omg.. yes i forgot the init.. thanks guys.. now its workingShoemake
Z
51

After logging into firebase with firebase login you will need to do: firebase init and then select the correct options when prompted. be sure to press the space bar to check the functions circle in the command line.

Zosema answered 15/10, 2018 at 17:48 Comment(0)
D
7
firebase init

or

firebase init hosting

And then popup question: Set up automatic builds and deploys with GitHub? No enter image description here

Downdraft answered 29/9, 2022 at 18:7 Comment(0)
H
2

firebase init didn't work for me, but firebase init hosting did. You can read the firebase hosting initialization docs here.

Hydride answered 4/5, 2022 at 17:24 Comment(1)
created the firebase.json for me. Worked thanksMisquote
T
-1

After running the firebase login command, do not delete the Firebase CLI Login Successful page in the browser and then run the firebase init command from the command line.

Theophany answered 31/12, 2023 at 18:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.