Questions tagged [firebase-cli]

The Firebase CLI provide a variety of tools for managing, viewing, and deploying to Firebase projects, as well as a set of emulators for Firebase products. It's available via the npm module firebase-tools.

These are the Firebase Command Line (CLI) Tools. They can be used to:

  • Administer your Firebase account

  • Interact with Firebase Hosting, our product to host your static HTML, JS, CSS, images, etc.

  • Interact with the Firebase Database, to read and write JSON data and deploy security rules

  • Interact with Firebase Storage, to read and write files and deploy security rules

  • Deploy Cloud Functions for Firebase code

  • Emulate Cloud Functions and Cloud Firestore locally for use in development and testing.

See also:

Related tags

814 questions
12
votes
3 answers

How to reset firestore emulator in integration test

I'm running my integration-tests in flutter and dart using the firestore emulator. First I start the firestore emulator with some data like so: firebase emulators:start --import=./dir. Then I start an android emulator and start the app I want to…
12
votes
6 answers

How to fix fastlane-plugin-firebase_app_distribution undefined

I'm trying to setup CI-CD for firebase app distribution on my local system. fastlane-plugin-firebase_app_distribution plugin can't be found. Error loading plugin 'fastlane-plugin-firebase_app_distribution': cannot load such file --…
sagarkothari
  • 24,520
  • 50
  • 165
  • 235
12
votes
3 answers

What's the reason for NPM Error on firebase deploy --only functions

I am recently getting this error when attempting to deploy my firebase functions. However, I didn't change any dependencies since last successful deploy... ✔ functions: all necessary APIs are enabled i functions: preparing functions directory for…
Mutual Exception
  • 1,240
  • 12
  • 27
12
votes
5 answers

You are initializing in an existing Firebase project directory

How do I change the Firebase project in my cli? When I run firebase init, it says: Before we get started, keep in mind: * You are initializing in an existing Firebase project directory ? Are you ready to proceed? (Y/n) It never asks on which…
user2828442
  • 2,415
  • 7
  • 57
  • 105
11
votes
7 answers

Unable to deploy a firebase cloud function due to permission error

I was trying to deploy my first firebase cloud function using firebase cli but I encountered an error instead : C:\Users\Anurag Tripathi\Desktop\firebasecloudfunction> firebase deploy --only functions Error: Missing permissions required for…
11
votes
2 answers

Unable to login Firebase with cli command

I'm trying to login to my Firebase account with cli command firebase login. I believe it should open browser and prompt me to login with my google account, but that doesn't seem to happen. Instead, it's asking me to enter my email and password in…
Vinay Sharma
  • 3,291
  • 4
  • 30
  • 66
11
votes
1 answer

How can I use 'firebase login:ci' on a build server

I am running a nodejs build using Github Workflows and I want to be able to build my project and then immediately deploy it to my firebase project. Using firebase deploy. But if I want to use the firebase-tools I have to login on the build server.…
tdmiller
  • 2,102
  • 2
  • 13
  • 28
11
votes
4 answers

Firestore admin in Node.js Missing or insufficient permissions

I am trying to access Firestore using Firebase Admin on Node.js v8.4.0 in a Firebase Cloud Function running locally using firebase functions:shell on Windows 10. firebase -v 4.2.1 "dependencies": { "firebase-admin": "^6.0.0", …
11
votes
6 answers

firebase deploy gives a "path" error

After initiating my firebase app with firebase init I tried to deploy it with firebase deploy but I get this error === Deploying to 'fugis-auto-services-website'... i deploying database, storage, functions, hosting Error: An unexpected…
Vanessa Flores
  • 115
  • 1
  • 6
10
votes
2 answers

firebase deploy command for Node.js application results in Error: `runtime` field is required but was not found in firebase.json

I am trying to deploy my Node.js application in firebase but when I run the command it results in the error Error: runtime field is required but was not found in firebase.json. I tried running the command firebase serve --only functions,hosting and…
10
votes
1 answer

How to run firebase (functions) emulator on https instead of http?

Would anyone know if there is a way to initialize a Firebase function (using emulator to debug locally) with an https address instead of the default http? I'm trying to debug a Telegram bot-related script and Telegram only allows https…
10
votes
3 answers

Firebase CLI change hosting target

I have two Firebase hosting sites in >Firebase >Hosting >Main (https://console.firebase.google.com/u/0/project/example/hosting/main) 1. **foobar**.web.app (default project from setup process) 2. **example**.web.app (added as an additional web app…
Tom
  • 5,588
  • 20
  • 77
  • 129
10
votes
2 answers

How to setup test data when testing Firestore Rules with Emulator?

I am working on tests for Cloud Firestore Rules, using mocha and Firestore Emulator, and the question is how to initialize some test data before running tests? To test my rules, I first need to initialize some test data. The problem is that I cannot…
10
votes
3 answers

Package.json indicates an outdated version of firebase-functions

I have Cloud functions project and i moved the project from my old laptop to my new laptop. I have installed everything that necessary. My problem is when i try firebase deploy it gives me that error: ! functions: package.json indicates an…
E.Bolandian
  • 553
  • 10
  • 35
10
votes
1 answer

Does firebase login:ci have access to all my projects?

I am using the firebase login:ci token for CI/CD. But there is not enough documentation regarding the token. Does it have access to all my firebase projects where my account has access or only the current active project? Where can I see a list of…