Questions tagged [firebase-tools]

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

The Firebase Command Line (CLI) Tools 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 your code to Cloud Functions for Firebase

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

See also:

Related tags

903 questions
256
votes
7 answers

How do I solve: Error: Failed to list Firebase projects. See firebase-debug.log for more info

So I'm minding my own business trying to initializing a Firebase project in my Angular app when all of the sudden I'm hit with this error: Error: Failed to list Firebase projects. See firebase-debug.log for more info. To get to that point, I…
Patrick
  • 11,552
  • 7
  • 29
  • 41
183
votes
9 answers

How do I switch apps from the firebase cli?

This seems like something which should be pretty easy to do, but for whatever reason, I'm being defeated. I'm trying to use the firebase-tools CLI to interact with my database. I'm able to login without any trouble, and when I type firebase list, I…
wvm2008
  • 2,864
  • 4
  • 21
  • 25
175
votes
7 answers

How to deploy some functions to Cloud Functions for Firebase without affecting some other functions?

When I run firebase deploy --only functions it reads the index.js file and updates all functions exported from that file. If on the previous deploy there was a function named a, and in the current deploy there is no such function, a will be deleted.…
Randy Sugianto 'Yuku'
  • 71,383
  • 57
  • 178
  • 228
156
votes
14 answers

how to end ng serve or firebase serve

I've been doing web development with Angular2 and have been using both Angular2 and Firebase to run local servers. I haven't been able to find a command similar to typing quit when using Ionic to create a server, so I have to close the terminal tab…
aheigins
  • 2,574
  • 3
  • 19
  • 26
96
votes
9 answers

How to import data from cloud firestore to the local emulator?

I want to be able to run cloud functions locally and debug against a copy from the production data. Is there a way to copy the data that is online to the local firestore emulator?
82
votes
3 answers

firebase deploy --only functions overrides existing functions

Running firebase deploy --only functions deletes the existing functions before creating new ones. Is it possible to modify this behavior to create if not exist, update if exists, no actions if functions not being deployed?
Quan Vuong
  • 1,919
  • 3
  • 14
  • 24
82
votes
5 answers

Firebase CLI: "Configure as a single-page app (rewrite all urls to /index.html)"

I just used the Firebase CLI to init a static hosting project. What exactly happens when you enable the "configure as a single-page app" option? I'm looking for a description of exactly which files are modified, and what kind of effect this has on…
Kayce Basques
  • 23,849
  • 11
  • 86
  • 120
80
votes
24 answers

Firebase serve error: Port 5000 is not open. Could not start functions emulator

I'm trying to serve firebase functions locally, but when I run firebase serve or firebase emulators:start the error message is: "Port 5000 is not open, could not start functions emulator." I'm using Windows 10, so I've tried to change the port…
Victor de Almeida
  • 990
  • 2
  • 7
  • 7
78
votes
19 answers

Error "The term 'flutterfire' is not recognized as the name of a cmdlet, function, script file, or operable program"

I'm trying to install flutterfire_cli in my root project, so I typed this command: FirebaseFirestore firestore = FirebaseFirestore.instance; After that, this is the console session (PowerShell): cd C:\Users\PC\Desktop\eventually dart pub global…
mr.Penguin
  • 1,166
  • 1
  • 8
  • 24
49
votes
11 answers

How can I shut down the local firebase emulators?

Currently I initialise the firebase emulators with: $ firebase emulators:start After some time working on it I want to stop it. How can I then stop the emulators?
user1447414
  • 1,306
  • 2
  • 12
  • 25
46
votes
23 answers

Firebase not running index.html file

I'm a pretty new programmer going through the Firebase tutorial. I have gone through steps 1-5 of the tutorial (https://codelabs.developers.google.com/codelabs/firebase-web/#5). I've added the "Add Firebase to your web app" js code to the html file,…
user2292210
  • 837
  • 1
  • 8
  • 8
43
votes
16 answers

npm ERR! asyncWrite is not a function

npm install -g firebase-tools npm ERR! asyncWrite is not a function npm ERR! pna.nextTick is not a function npm ERR! A complete log of this run can be found in: npm ERR! /home/developer/.npm/_logs/2018-05-30T05_42_20_569Z-debug.log .log…
43
votes
4 answers

How do I deploy Firebase Database Security rules using the command line?

In older versions of Firebase, we could add a rules section to our firebase.json file, and upload new security rules on every deploy. How do we use the firebase-tools v3 command-line tools to deploy database security rules? This page says that it's…
Seth Ladd
  • 112,095
  • 66
  • 196
  • 279
36
votes
9 answers

firebase version is not updating through

i am windows user and trying to update firebase version using npm install -g firebase-tools but when i run firebase --version it shows the same version. I also run npm uninstall firebase --save and check firebase --version it shows same. what…
Farrukh Hanif
  • 361
  • 1
  • 3
  • 4
36
votes
5 answers

Cannot deploy angular app on firebase

This is my first time when I try to deploy a web application on a remote server. I chose Firebase to deploy my angularJs app. These are the steps provided by them: npm install -g firebase-tools <---- successfully installed firebase init <- Here it…
Bogdan Adrian
  • 512
  • 1
  • 4
  • 10
1
2 3
60 61