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
4
votes
1 answer

using node --inspect to attach Firebase emulated functions to browser DevTools

I'm attempting to use node --inspect to attach my index.js Firebase functions to chrome devtools for a richer debugging experience than the terminal logs offer. So far I've met with no success; here's what I've tried: simply running either…
ultraGentle
  • 5,084
  • 1
  • 19
  • 45
4
votes
5 answers

Debugging Firebase functions locally (node.js)

see below my code is very simple....it listens to a change on a database field in realtime-database. const functions = require("firebase-functions"); var admin = require("firebase-admin"); exports.onActiveUpdate = functions.database …
4
votes
2 answers

How to write to firestore emulator?

I am developing a firebase cloud function that writes to a firestore database. During development I want the function to write to a local database. So I've started a firestore emulator. But the data is still written to the actual database. How can I…
4
votes
2 answers

Cannot get FieldValue.increment working in Firestore emulator with Admin SDK

I am trying to get a simple atomic increase/decrease working in Firebase Cloud Functions with Firestore triggers. To test these, I want to execute local tests with the Firestore emulator. But I always get the error FirebaseError: Function…
4
votes
0 answers

Firebase: Suddenly can't deploy anymore

I never had any problems deploying with my project. Suddenly I can't, and I have no idea why. I am getting this error: Error: HTTP Error: 400, Location must equal europe-west1 because the App Engine app that is associated with this project is…
Jesper
  • 2,644
  • 4
  • 30
  • 65
4
votes
3 answers

Firebase deploy functions - HTTP Error 403

When trying to deploy my Firebase Functions (after switching computers) I get an error and can't deploy. Error: HTTP Error: 403, Service Usage API has not been used in project 563584335869 before or it is disabled. Enable it by visiting…
Pieter
  • 2,188
  • 20
  • 27
4
votes
0 answers

How to locally integration test Firebase Cloud Function triggers for Firestore?

I am developing Firebase Cloud Functions that should react on documents created or updated in Firebase Firestore. I want to write integration tests for these functions so that I can be sure they work as intended but I am stuck when trying to use the…
4
votes
1 answer

What is the JSON format for a firestore individual field index within a collection group query?

We can now retrieve documents from a collection group which is great. To do so, I need to create an index through an error message on the Firebase console. How can I add this new index to the firestore.indexes.json file? Example of the…
4
votes
3 answers

Getting Firebase emulator error because non-existent SDK is not enabled

I'm trying to get some Firebase functions emulated locally, and have followed Google's local emulator instructions. When I run firebase serve I get this error: Error from emulator. FirebaseError: HTTP Error: 403, Mobile SDK API has not been used in…
guyot
  • 364
  • 1
  • 9
4
votes
3 answers

how to use firebase cloud function pubsub.schedule?

Today, there is new feature of Cloud Functions for Firebase which is running functions on a schedule. So I tried to test the sample code. index.js file exports.scheduledFunction = functions.pubsub.schedule(‘every 5 minutes’).onRun((context) => { …
Sss Steve
  • 55
  • 1
  • 1
  • 6
4
votes
1 answer

"EACCES: permission denied" when using "firebase serve"

I am using "firebase serve" to test my Firebase web app locally. I ran into this error every time: Error: EACCES: permission denied, open '/Users/[my_user_name]/.config/configstore/@google-cloud/functions-emulator/.functions.json' You don't…
Xi 张熹
  • 10,492
  • 18
  • 58
  • 86
4
votes
1 answer

How to Exit from firebase serve --only functions in Terminal

In my terminal, I typed: > MacBook-Pro-9:firecast $ firebase serve --only functions I invoke realtime database functions for instance like: myDatabaseFunction('old_data') Then I was done. Is there a way to exit from the running process without…
Red M
  • 2,609
  • 3
  • 30
  • 50
4
votes
4 answers

Firebase CLI: the following filters were specified but do not match any functions in the project

I use Firebase Cloud Functions in my project, and I have a plenty of them so when I run the regular firebase deploy I exceed the quota, so one option is to deploy only the function that was modified by using firebase deploy --only…
Ameer Taweel
  • 949
  • 1
  • 11
  • 37
4
votes
1 answer

Firebase deploy Error Enoent

When i run command deploy i get the following error: npm ERR! path C:\Users\hp\nodes\%RESOURCE_DIR%\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open…
4
votes
4 answers

Firebase command not found days after having already successfully used it

I am trying to use the 'firebase' command from my Mac terminal to deploy firebase cloud functions using 'firebase deploy --only functions'. I just used this command a week or two ago when I updated my firebase-functions and firebase-tools to version…
MikeG
  • 3,745
  • 1
  • 29
  • 51