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

Is it possible to run a script from Firebase Functions Shell?

I've been using the Firebase Functions Shell (firebase experimental:functions:shell) and am finding it excellent for testing the firebase database and http listeners. However it is a little annoying that I have to copy-paste test code in the…
4
votes
2 answers

Firebase Deployed URL not working?

So I have built a simple firebase and javascript app that uses firebase database and hosting. I have successfully built the app and deployed to Firebase hosting, however when the cmd provides the url that leads to the app it takes me to some…
DS7
  • 165
  • 2
  • 8
4
votes
2 answers

Firebase hosting does not send custom HTTP headers

According to Firebase Hosting docs, I should be able to set custom headers on responses received from the server. I am trying to set the X-Frame-Options header on all html files, but the server simply does not want to send this header! Here's my…
Naresh
  • 23,937
  • 33
  • 132
  • 204
4
votes
2 answers

Can't login to Firebase (Allow Firebase to my Google Account) on Docker Image

I'm building a Docker image with NodeJs and Firebase Tools for a Local Development Environment. Since I'm in an non-interactive mode I used firebase login:ci --interactive When running this command on my Dockerfile it retrieves me a token just…
LRS
  • 51
  • 1
  • 3
4
votes
2 answers

Firebase functions deploy results in "Error in the build environment"

When I try to deploy functions with the firebase-tools cli I always receive a Deployment error for every function. The output looks like this: ! functions[import]: Deployment error. Error in the build environment I have tried to deploy in…
3
votes
2 answers

Husky prepare script failing firebase function deployment

I have installed husky in my npm project as a prepare script like below { "name": "functions", "scripts": { "build": "tsc", "start": "npm run serve", "deploy": "firebase deploy --only functions", "prepare": "husky install…
3
votes
0 answers

Failed to load function definition from source: Failed to generate manifest from function source: Error: Cannot find module 'firebase-admin/auth'

I'm getting the following error while trying to deploy any function to firebase functions: Command: firebase deploy --only functions And this is the output i deploying functions i functions: ensuring required API cloudfunctions.googleapis.com is…
3
votes
1 answer

Firebase functions times out, runWith options not working

Note: i've set this up with Firebase Functions. Emulator When my firebase function takes more than 5 seconds, it returns { code: "ECONNRESET" } The console shows: functions: Your function timed out after ~300s. To configure this timeout,…
3
votes
3 answers

Unable to Deploy Cloud Functions - Permission denied to enable service [artifactregistry.googleapis.com]

I'm trying to deploy the default test function to check that everything works. const functions = require("firebase-functions"); exports.helloWorld = functions.https.onRequest((request, response) => { functions.logger.info("Hello logs!",…
3
votes
0 answers

"firebase.ps1 cannot be loaded because running scripts is disabled on this system" when I try to firebase init from vs code

firebase : File C:\Users\WALTON\AppData\Roaming\npm\firebase.ps1 cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. At line:1…
ROXY
  • 31
  • 1
  • 2
3
votes
1 answer

Is credential necessary when running Firebase Admin with Firebase Emulator?

I'm running Firebase Admin SDK on python through functions-framework with Firebase emulator set up on different terminal and I have a question. While this works on shell(zsh)...: # python import firebase_admin from firebase_admin import auth as…
3
votes
2 answers

How to disable Firebase Storage emulator?

When I start the emulators, the Storage emulator starts and is available at localhost:9199. Then I access storage with the admin SDK in node.js with: serviceAccountKey = require('./serviceAccountKey.json'); const config = { credential:…
Louis Coulet
  • 3,663
  • 1
  • 21
  • 39
3
votes
0 answers

Error when uploading a large number of files to FireBase Hosting

I'm trying to upload 19,941 files weighing 222 MB to FireBase Hosting. I log in as usual with firebase login, then initialize firebase init and deploy firebase deploy. But when deploying, an error occurs: === Deploying to 'wowonder-b514c'... i …
3
votes
3 answers

Unable to set publicly accessible IAM policy on the following functions:

I recently inherited managing a firebase project and I am trying to recreate the project so I have a production and development version to use and while I was deploying my functions I got the following message: Unable to set publicly accessible IAM…
3
votes
0 answers

Firebase Error "Auth Emulator does not validate JWTs"

I am trying to test my auth function for firestore in the emulator suite. Is it normal to get this error when trying to authenticate a user via google? This doc from Firebase seems to suggest that google auth should work in the emulator suite.…