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

How can I reset the default project hosting with firebase?

I have been using firebase to test apps. I set a certain project as the default. Now I would like to deploy a different project but do not understand how to remove the previous project as a default. (I have almost no experience using the terminal).
Quddus George
  • 962
  • 2
  • 14
  • 30
10
votes
3 answers

Firebase Serve command failing with error 404

Whenever I run firebase serve on my mac I am getting a 404 error...This has never happened before and I was just using the local dev server maybe 5 minutes before this started happening. I have deleted the firebase.json file and reinitialized it,…
Kevin Gardenhire
  • 626
  • 8
  • 22
9
votes
3 answers

Firebase.auth().useEmulator is not a function

I currently have a project set up through VueCLI and firebase-tools and can't seem to be able to attach the Firebase Auth emulator to my project locally. My Firebase Set-up file: import firebase from 'firebase/app'; import 'firebase/auth'; import…
9
votes
0 answers

Multiple Firebase projects | logins

I have multiple customer projects with project directories in VScode that I switch between. These all use Firebase and have different Firebase (i.e. Google accounts). Every time I switch I have to firebase logout Switch to the active Chrome…
Lee
  • 141
  • 7
9
votes
1 answer

Firebase CLI: "functions: WARNING! NO ENGINES FIELD FOUND IN PACKAGE.JSON. DEFAULTING TO NODE 6 RUNTIME."

I upgraded my Firebase CLI to version 6.8.0. Now, when I deploy my functions, I get a warning message that looks like this: ⚠ functions: WARNING! NO ENGINES FIELD FOUND IN PACKAGE.JSON. DEFAULTING TO NODE 6 RUNTIME. Starting June 1, 2019…
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
9
votes
6 answers

Firebase Function Deployment issue: package.json not found in %RESOURCE_DIR%

I having problem of deploying Firebase Cloud Functions. Steps to reproduce firebase init select function only select Firebase Project select Javascript use ESLint install dependencies with npm now Run firebase deploy Expected Result Expecting…
Jerry
  • 1,455
  • 1
  • 18
  • 39
8
votes
3 answers

Firebase error.. Error: Failed to make request to https://www.gstatic.com/firebasejs/releases.json

I am deploying my React app to firebase hosting. when I create firebase init and select all options I am getting this error. C:\Users\user\git\Apps\screem>firebase init ######## #### ######## ######## ######## ### ###### ######## …
SUHEL MAKKAD
  • 100
  • 2
  • 5
8
votes
1 answer

How can i populate collections in Firestore Emulator?

I have a function which returns a list of objects, I need some way so that i can populate this data in local firestore emulator and not in actual cloud firestore instance. How can I achieve it?
Nurul Sundarani
  • 5,550
  • 3
  • 23
  • 52
8
votes
0 answers

Writing integration tests for Firebase with local emulators for both Cloud Functions and Cloud Firestore

I'd like to write some integration tests (using jest, although that probably isn't very important) that test an "HTTPS callable" Firebase Cloud Function that writes to Cloud Firestore. Those writes in turn trigger other Cloud Functions. I'd like to…
optilude
  • 3,538
  • 3
  • 22
  • 25
8
votes
3 answers

'firebase deploy' Error - Must supply a public directory using "public" in each "hosting" config

I am receiving the error 'Must supply a public directory using "public" in each "hosting" config.' when deploying my firebase app. How do I fix this?
nate
  • 139
  • 2
  • 9
8
votes
6 answers

Firebase Hosting Deploy Error: Task 5fc... failed: retries exhausted after 6 attempts

I am trying to setup a 2 brand new Firebase projects with Firestore, Functions, Storage, and Hosting for both Production and Development environments. I started with deleting the references to the old firebase project: both firebase.json &…
8
votes
1 answer

Import Firebase User with Custom Claims

I am trying to export and import user using the firebase CLI as per docs available here. My problem is that I want to also export the user claims, or at least be able to include custom claims when importing the user. Basically to export I run on the…
Estevao Santiago
  • 793
  • 2
  • 7
  • 30
8
votes
4 answers

Firebase CLI v7.0.0 is incompatible with Node.js v6.17.1 Please upgrade Node.js to version >= 8.0.0

I upgraded my Firebase CLI (firebase-tools) to version 7.0.0. Now, when I run it, it gives me a message: Firebase CLI v7.0.0 is incompatible with Node.js v6.17.1 Please upgrade Node.js to version >= 8.0.0 How do I fix this?
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
8
votes
3 answers

Possible to make Prettier allow chaining functions on new lines?

I'm writing some Firebase functions. Out of the box, it comes with EsLint with eslint-plugin-promise (which is great). It seems that eslint-plugin-promise is bringing in prettier as well. I'm not used to prettier, but I've configured a few things to…
leros
  • 485
  • 6
  • 16
8
votes
2 answers

Cross-project access to Firebase Database from a service account

I have a Firebase project that does not have billing enabled. I want to create database backups using a VM that belongs to another, billing-enabled project. The backup script is as simple as: .npm/bin/firebase --project $PROJECT_ID database:get / A…
J. Williams
  • 684
  • 1
  • 7
  • 17