Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can not initialize existing firebase project from CLI because it tells me I do not have firestore enabled

I am using firebase CLI to initialize a local firebase project directory from an existing firebase project. This existing project does have firestore with 100% certainty (there is tonnes of data in it). It is definitely firestore and not real time db.

I am running..

firebase init firestore

Then I pick the existing project from the list, and I get...

Error: It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/some-project/firestore to create your Cloud Firestore database.

Is there potentially a permission issue here?

like image 655
Scorb Avatar asked Dec 09 '25 04:12

Scorb


1 Answers

I came here looking for the answer to this question and whilst your issue may be different, I found that I had no default resource location set for my firebase project.

In the firebase console go to cog icon > project settings > general. the fourth option down is 'Default GCP resource location'. This was not set, so editing it (pencil icon) and clicking done (There was only one option for me) fixed the issue.

Discussion around this topic can be found here: https://github.com/firebase/firebase-tools/issues/4254#issuecomment-1310619259

like image 79
Jompra Avatar answered Dec 12 '25 01:12

Jompra



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!