Set Firebase init Directory for cloud functions

Viewed 7398

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.

3 Answers

I found this thread as I was having a problem initialising a firebase function directory. I am in directory D:/dir1/dir2 but whenever I ran "firebase init functions" it came up with:

You are about to initialise a firebase project in this directory: D:/

Found out there was a D:/firebase.json and D:/firebase.c from a previous bad install. Removed them and started the "firebase init functions" again to get the directory: D:/dir1/dir2

Reseting auth work for me. Here is the command

firebase login --reauth

Related