17

Was recently added to a new firebase project via the web interface but it isn't showing up in firebase list. I can see the project in my firebase console. I've tried restarting my terminal, logging out/in, and doing firebase use, but no avail.

Any ideas?

Thanks.

qunayu
  • 1,187
  • 1
  • 11
  • 18
  • 3
    Two things come to mind: 1) make sure you actually created the project under the account you're using in the CLI, 2) if you have many projects, the CLI may initially show a subset, user your cursor keys to move and see other projects. – Frank van Puffelen May 16 '18 at 23:47
  • 2
    @FrankvanPuffelen what it is, is that you must enable Firestore (and/or perhaps Storage) on the firebase.google.com website. i.e. configure your project first, then when you choose features, e.g., firestore, storage, etc in Step 1 of firebase-cli `firebase init` projects with those features enabled show up in Step 2 "choose project" – Ronnie Royston Nov 29 '18 at 04:52

9 Answers9

11

firebase-init first asks which features you wish to use, e.g. database, firestore, storage, etc.

If you choose firestore but have not yet enabled Firestore in your newly created Firebase project via firebase.google.com website, that project will not show up as a project option.

So, before running firebase-cli, enable all the features you want via the website first, ...before chosing those features in step 1 of firebase init.

Once you've enabled Firestore, for example, your project will now show up.

Ronnie Royston
  • 16,778
  • 6
  • 77
  • 91
  • I don't know why but it happens, when the default delay is too much for you, To enable database is a good option to see the project in the list and link fast. – Juan Antonio Jan 30 '19 at 19:21
8

You can select your project if you know the project id:

firebase use --add

That will select the project, so when you type "firebase init" will not show the select project option but take you to the next step

Juan Sánchez
  • 1,014
  • 2
  • 15
  • 29
8

There is now a --project option you can use with firebase init to choose the project.

firebase init --project <projectId>
3

After 24 hrs, the project finally showed up in my list. Turns out there's just an extremely long delay if you're not the owner of the project.

qunayu
  • 1,187
  • 1
  • 11
  • 18
  • Hi, I'm having similar [problem](https://github.com/firebase/firebase-tools/issues/1098) but my one not listing at all. Do you meant we just need to wait awhile after seeing `? Which project do you want to add? (Use arrow keys)` – micksatana Jan 10 '19 at 06:23
  • Hope you are right because if not I am in big trouble tomorrow – I'm not human Mar 17 '21 at 01:33
2

While following the firebase init steps, use the [don't setup a default project] option.

Then use firebase use --add projectId to add the project.

Taher A. Ghaleb
  • 5,120
  • 5
  • 31
  • 44
Nayan Arora
  • 47
  • 1
  • 7
1

So recently I changed my password, and was still logged into my firebase account, I did firebase logout and then tried firebase login again, and this time the firebase use --add command worked

Dana Ng
  • 11
  • 3
0

In case this helps anyone else: a firebase project is just a firebase-enabled Google Cloud Platform project.

You can create a GCP project but it won't appear in the firebase CLI until you visit console.firebase.google.com and enable firebase for your GCP project of choice.

Then

firebase use --add your_google_cloud_platform_project_id

Should detect your project.

RP-3
  • 684
  • 4
  • 22
0

When firebase init asks you to choose a project from the list just check [don't setup a default project] and after the installation you can manually add the project to the .firebaserc file as shown below.

{
  "projects": {
    "default": "your-project-id"
  }
}

You can check the id's of your projects with the command firebase list. It'll also show the current project.

Lars
  • 13
  • 2
0

The below solution worked for me.

Get the Project Id from firebase console. e.g. myproject-2233

On Firebase CLI run below command $ firebase -P myproject-2233

Next Select the features you want to add e.g. Web Hosting Next Select "Don't Setup a default project" Give the public folder name

It worked only after choosing "Don't Setup a default project"

Lalit Rane
  • 850
  • 10
  • 16