Firebase CLI: No project is currently active

Jake Wilson picture Jake Wilson · May 6, 2017 · Viewed 12.1k times · Source

I'm following this Firebase intro tutorial:

https://codelabs.developers.google.com/codelabs/firebase-web/

I follow the instructions and when I get to step 3, I run firebase use --add and I get the following:

# firebase use --add

> [email protected] firebase ~/repos/friendlychat/web-start
> firebase "use"

No project is currently active.

Run firebase use --add to define a new project alias.

But if I run firebase list I see this:

┌──────────────┬───────────────────────┬─────────────┐
│ Name         │ Project ID / Instance │ Permissions │
├──────────────┼───────────────────────┼─────────────┤
│ FriendlyChat │ friendlychat-x3sd0    │ Owner       │
└──────────────┴───────────────────────┴─────────────┘

So I am clearly logged in correctly as I can list my projects and have some sort of access to them on the CLI. But does the error mean it's not active? How do I activate it? There is nothing in the tutorial about this.

What am I missing here? Seems like it's something obvious that I'm just not seeing.

Answer

Muki picture Muki · Nov 13, 2017

I had the same issue and fixed it by running firebase init again. The file that was missing was the .firebaserc.

The content of this file

{
   "projects": {
     "default": "yourid"
   }
}

hope that helps, Muki