I’m using react and I want to use firestore as a database. I got so stuck on this that I’m now rebuilding the entire project. I’ve ran:
- npm install -g firebase-tools
- firebase login
- firebase init
but 3 outputs:
<code>Error: It looks like you haven't used Cloud Firestore in this project before. Go to https:// console.firebase.google.com/project/conductive-air-424016-b1/firestore to create your Cloud Firestore database.
<code>Error: It looks like you haven't used Cloud Firestore in this project before. Go to https:// console.firebase.google.com/project/conductive-air-424016-b1/firestore to create your Cloud Firestore database.
</code>
Error: It looks like you haven't used Cloud Firestore in this project before. Go to https:// console.firebase.google.com/project/conductive-air-424016-b1/firestore to create your Cloud Firestore database.
I’m trying to install it in a firebaseConfig folder. I have created a Firestore collection and input some example data there.
I’m using:
<code>"firebase": "^10.12.1",
"@firebase/rules-unit-testing": "^3.0.3",
<code>"firebase": "^10.12.1",
"@firebase/rules-unit-testing": "^3.0.3",
</code>
"firebase": "^10.12.1",
"@firebase/rules-unit-testing": "^3.0.3",
In my old project I was able to install it and make it work with the emulator, but only to get an empty array from the actual database.
I’ve seen other posts but none of them helped me since their solution was to either downgrade or upgrade firebase.
Firestore rules are set to public.
If I need to downgrade, I don’t know the latest working version.
My database is set to native not Datastore.
Console:
######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########
You're about to initialize a Firebase project in this directory:
? Are you ready to proceed? Yes
? Which Firebase features do you want to set up for this directory? Press Space to select features, then Enter to confirm your choices. Firestore: Configure
security rules and indexes files for Firestore, Emulators: Set up local emulators for Firebase products
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.
? Please select an option: Use an existing project
? Select a default Firebase project for this directory: "Project_Name"
i Using project "Project_Name"
Error: It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/"Project_Name"/firestore to create your Cloud Firestore database.
Having trouble? Try firebase [command] --help
<code>firebase init
######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########
You're about to initialize a Firebase project in this directory:
? Are you ready to proceed? Yes
? Which Firebase features do you want to set up for this directory? Press Space to select features, then Enter to confirm your choices. Firestore: Configure
security rules and indexes files for Firestore, Emulators: Set up local emulators for Firebase products
=== Project Setup
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.
? Please select an option: Use an existing project
? Select a default Firebase project for this directory: "Project_Name"
i Using project "Project_Name"
=== Firestore Setup
Error: It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/"Project_Name"/firestore to create your Cloud Firestore database.
Having trouble? Try firebase [command] --help
</code>
firebase init
######## #### ######## ######## ######## ### ###### ########
## ## ## ## ## ## ## ## ## ## ##
###### ## ######## ###### ######## ######### ###### ######
## ## ## ## ## ## ## ## ## ## ##
## #### ## ## ######## ######## ## ## ###### ########
You're about to initialize a Firebase project in this directory:
? Are you ready to proceed? Yes
? Which Firebase features do you want to set up for this directory? Press Space to select features, then Enter to confirm your choices. Firestore: Configure
security rules and indexes files for Firestore, Emulators: Set up local emulators for Firebase products
=== Project Setup
First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.
? Please select an option: Use an existing project
? Select a default Firebase project for this directory: "Project_Name"
i Using project "Project_Name"
=== Firestore Setup
Error: It looks like you haven't used Cloud Firestore in this project before. Go to https://console.firebase.google.com/project/"Project_Name"/firestore to create your Cloud Firestore database.
Having trouble? Try firebase [command] --help