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
4
votes
0 answers

Firebase Cloud Functions: Import Environment Configurations from File?

According to Firebase documentation, environment configs can be set by running the command: firebase functions:config:set someservice.key="THE API KEY" someservice.id="THE CLIENT ID" However, I am wondering is there a way to import environment…
Derek
  • 655
  • 1
  • 8
  • 9
4
votes
1 answer

Firebase CLI redirect_uri_mismatch on login

Cannot log in to the firebase CLI. firebase login Generates the following error prompt in browser: The redirect URI in the request, http://localhost:9005, does not match the ones authorized for the OAuth client. Visit…
matthiasdv
  • 1,136
  • 2
  • 15
  • 26
4
votes
1 answer

How to firebase deploy through Bitbucket Pipeline?

I am using angular-cli project and I used Heroku for CD integration. And the repository is on Bitbucket. Now I am going to use firebase deploy service through Bithubcket pipeline, so I tried as below. package.json { "name": "mail-activator", …
4
votes
3 answers

Can't deploy Cloud Functions for Firebase

I was deploying functions just fine, but then it stopped working, and I don't know why. I've reverted back to the sample code (from here or here): const functions = require('firebase-functions'); const admin =…
Glen Little
  • 6,951
  • 4
  • 46
  • 68
4
votes
2 answers

Cloud Functions for Firebase: Project structure multiple self-contained functions

I am trying to create a project structure similar to the following: --firebase-admin-project --firebase.json --functions --anonymous-login --node_modules --index.js --package.json --auth-login --node_modules …
4
votes
2 answers

firebase serve in docker container not visible to host os

Running in a docker container with the ports 9005 available to the host os and when i run firebase serve -p 9005 and then try to access this from the host os (windows) using http://localhost:9005 I get an empty response
graham
  • 258
  • 1
  • 9
4
votes
2 answers

firebase hosting - terminal hangs waiting for authentication

I just created a firebase account using my Gmail account and I want to test deploying a simple JS app to the cloud. I'm using Linux. I type in firebase init and the terminal says, "Waiting for authentication" then the browser opens and for a quick…
user441058
  • 1,188
  • 1
  • 16
  • 32
4
votes
3 answers

Firebase serve not working

I've been migrating to Firebase 3.0, and with the new changes, we have to use firebase serve on the CLI for local development, and I believe this defaults to port 5000. However, after going through the init process, running firebase serve doesn't do…
user3777933
  • 414
  • 1
  • 5
  • 17
3
votes
1 answer

Firebase Functions with sub path imports outside of project

I have a firebase functions project with typescript. In this project I use types outside of the project with sub path imports, the result of this is that the build files are skewed. instead of main:lib/index.js I have…
3
votes
4 answers

Firebase function deployment fails with 'missing' dependencies error

I am encountering an error when attempting to deploy a Firebase function. Despite deleting node_modules and package-lock.json, running npm install, and executing firebase deploy --only functions many times, the build process still fails with the…
Tui
  • 105
  • 1
  • 14
3
votes
0 answers

dynamic routes in app dir in nextjs13 not working after deploying to firebase hosting

I am using NextJs 13 with experimental feature of "appDir" while deploying to firebase hosting, dynamic routes become static path. for example : path app/[slug]/page.jsx become http://example.web.app/[slug] You can see [slug] is consider as static…
3
votes
0 answers

Failed to load function definition from source

While running firebase emulators:start, I get this error 70% of the time: !! functions: Failed to load function definition from source: FirebaseError: User code failed to load. Cannot determine backend specification But for some reason, restarting…
Light Yagami
  • 481
  • 4
  • 7
3
votes
0 answers

My firestore data is being written both to the emulator and my actual project database when running locally

I'm writing some data to firestore using the nodejs firebase-admin/firestore package, on an endpoint running on firebase functions. When running this endpoint locally using the firebase emulator, the data gets written both to the local emulator, and…
3
votes
1 answer

How can I practically use firebase emulators and deploy previews in GitHub actions if PRs from forks can't access secrets?

I use Firebase secrets for two things in my GitHub Actions workflow: FIREBASE_TOKEN to run tests with the hosting emulators. The docs say "The token should be treated like a password; make sure it is kept secret." firebaseServiceAccount to deploy…
Alex Hall
  • 34,833
  • 5
  • 57
  • 89
3
votes
1 answer

Creating and validating (JWT)-tokens with FireBase Auth Emulator

I aim to issue tokens via firebase admin to use for authentication for local development with the emulator. Using the FireBase Admin targeting a local project(demo-project) in the emulator. The following code is used to lookup a user and issue and…