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
8
votes
2 answers

Cannot upgrade or remove firebase from system

I cannot, as the title suggests, upgrade or in any way remove the current version of firebase off my system and I don't understand why. I installed it using the firebase commands prompted when you first start a project, something in line with npm…
Xweque
  • 605
  • 1
  • 9
  • 29
8
votes
3 answers

What recent change to Firestore makes it complain about "Overlapping recursive wildcard match statement"?

Today I noticed that I am unable to deploy my Firestore rules, even though they worked fine until now and I didn't change them. Here's an excerpt of the part it doesn't like: match /databases/{database}/documents { function…
Thijs Koerselman
  • 21,680
  • 22
  • 74
  • 108
8
votes
2 answers

ESLint error trying to deploy functions Firebase

I'm try to deploy fireabase example , but when I try to deploy it , CLI launches an error: [CODE] const functions = require('firebase-functions'); //to activate firebase functions const admin = require('firebase-admin'); //to active firebase…
Shudy
  • 7,806
  • 19
  • 63
  • 98
8
votes
1 answer

Access of configuration variable in Cloud Functions Firebase CLI local emulator failed

I am using Firebase Functions. I set a environment variable by command: firebase functions:config:set my.token="abcde" I verified it by command: firebase functions:config:get which returns me: { "my": { "token": "abcde" } } in my index.js…
Leem
  • 17,220
  • 36
  • 109
  • 159
7
votes
3 answers

Firebase CLI commands printing unexpected malicious looking response on Linux, The text has infinite number of word: 'testing'

I am using Ubuntu. I have recently installed firebase-tools using npm with the command as officially stated: npm install -g firebase-tools Also later unaware, installed another package locally in my project called firebase. Using the command: npm…
Kartik Arora
  • 958
  • 1
  • 10
  • 17
7
votes
1 answer

Firebase CLI deploy error: "Deploys to runtimes below Node.js 10 are now disabled in the Firebase CLI."

I have a project using Cloud Functions for Firebase, and after updating the Firebase CLI to version 9.0.0, I am getting an error message: Error: package.json in functions directory has an engines field which is unsupported. Valid choices are:…
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
7
votes
1 answer

how to resolve firebase deploy function error: Cloud Functions deployment requires the pay-as-you-go (Blaze) billing plan

(base) macbooks-mbp:functions macbook$ firebase deploy === Deploying to 'fir-project1-e0b25'... i deploying functions Running command: npm --prefix "$RESOURCE_DIR" run lint > functions@ lint /Users/macbook/fireCast/functions > tslint --project…
Moin Ahmed
  • 83
  • 1
  • 1
  • 4
7
votes
1 answer

Realtime database emulator ignores database.rules.json

I have a Firebase project that uses the realtime database, and I'm trying to set up the local emulator for testing. Unfortunately, it seems that the Firebase-cli is ingoring my database.rules.json file. This happens even after creating a test…
7
votes
1 answer

How can I deploy to different firebase environments using github actions and w9jds/firebase-action

I'm trying to set up CI to firebase for my angular project using Github Actions, but I have both a staging and production environment and I want to deploy to each of them according to which branch I pushed to. I know that I can create two different…
7
votes
2 answers

Firebase deployed to wrong hosting when multiple projects used

I have two firebase projects: myapp for prod, and myapp-dev for dev environment. I first used the firebase cli to init my project with "myapp" and so all the files were generated with this, including the hosting resource myapp (so I can deploy my…
ValLeNain
  • 2,232
  • 1
  • 18
  • 37
7
votes
3 answers

How to get the measurementId from the Firebase config?

To play with Google Analytics for Web based projects on Firebase we need to use either the Firebase reserved URLs or to copy/update the Firebase config object as the documentation states here. I am using the following command to print that config…
Filipe Brito
  • 5,329
  • 5
  • 32
  • 42
7
votes
2 answers

How do I generate a Firebase auth token from the command line, for use in external build/deploy pipelines?

1. Summarize the problem I am trying to generate a Firebase token to use in a Bitbucket deployment pipeline. I have firebase-tools installed on a GCE VM, and I am not running firebase-tools on my local (Windows) machine. On a GCE VM (my build…
user10664542
  • 1,106
  • 1
  • 23
  • 43
7
votes
1 answer

Firestore triggers not running on emulator

When running my firestore triggers on a local firestore and functions emulators, they do not actually trigger. At times I have gotten them to trigger, but then I make a few small changes and everything suddenly stop working. My emulator is running…
7
votes
0 answers

How can I use Firebase-Cli to create a hosting site for my project programmatically?

I need to programmatically create a staging site with firebase for CI/CD. I can get multiple hosting sites to work as described here in the docs: https://firebase.google.com/docs/hosting/multisites However this process requires me to go to the…
Jonathan002
  • 9,639
  • 8
  • 37
  • 58
7
votes
2 answers

Firebase deploy function --non-interactive

I am integrating CI/CD for deploying my firebase functions. firebase use PROJECTID --token FIREBASE_TOKEN firebase deploy --token FIREBASE_TOKEN --non-interactive Now whenever a function is deleted from index.js, it throws the following…