cipano
cipano

Reputation: 167

Firebase CLI not working (firebase deploy)

I have setup my firebase cloud functions and CLI correctly and deployed my function for the first time already and all worked fine.

Now that I closed the command prompt and ran it again, firebase does not recognize my project. When I run firebase deploy it give me this Error: "Error: Not in a Firebase app directory (could not locate firebase.json)". Does anyone know how to fix this?

Upvotes: 1

Views: 1035

Answers (1)

Sathi Aiswarya
Sathi Aiswarya

Reputation: 2905

Firebase automatically creates your firebase.json file at the root of your project directory when you run the firebase init command.

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.you can refer to this link.

firebase login and firebase init will initialize the file firebase.json. Also, run firebase deploy inside the root directory of the project folder where firebase.json lives..

You can follow the video tutorial in this document which might help you.

Upvotes: 2

Related Questions