Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Set Firebase init Directory for cloud functions

I'm trying to set up Firebase cloud functions, but when I input firebase init into terminal, it says:

You're about to initialize a Firebase project in this directory: /Users/username`.

How do I save the folder in my projects directory? I tried...

cd ~/Desktop/MyProject/
firebase init

But it didn't work. And Firebase documentation isn't very clear about this. All they say is this...

To initialize your project:

  1. Run firebase login to log in via the browser and authenticate the firebase tool.
  2. Go to your Firebase project directory.
  3. Run firebase init functions.

Any ideas? I feel like I'm missing something simple. Thanks.

like image 705
nachshon f Avatar asked Dec 01 '22 15:12

nachshon f


1 Answers

I had the same problem. All you have to do is:

1) locate the firebase.json file in your /Users/username directory
2) delete that firebase.json file
3) Now run the firebase init command in your new project directory

This worked for me. Hope this helps.

like image 71
Ernie Avatar answered Dec 04 '22 13:12

Ernie