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
24
votes
7 answers

firebase-tools "Error: certificate has expired"

This morning I tried to deploy my react project to firebase hosting but I received this error: Error: Server Error. certificate has expired Then I tried to execute firebase list command to see the list of my projects but again I received the same…
24
votes
2 answers

How to deploy functions from other directory than '/functions'?

David in his repo: https://github.com/davideast/react-ssr-firebase-hosting has the file with firebase functions index.js in the main root, not in the /functions directory. However, if I do the same and drop my index.js file to main root, if I do…
Patrickkx
  • 1,740
  • 7
  • 31
  • 60
23
votes
10 answers

how to solve Firebase CLI error on start up

when I open firebase CLI I get this error : Let's make sure your Firebase CLI is ready... undefined:1 SyntaxError: Unexpected end of JSON input at JSON.parse () at ChildProcess.
Remon Shehatta
  • 1,324
  • 1
  • 10
  • 21
23
votes
6 answers

Unable to connect to firebase emulator suite with exec

Started firebase project emulators (which uses cloud functions and firestore) with below command firebase emulators:start It runs successfully and gives me a path to connect to the functions and shows a local host url for firestore too. Then, to…
Ayyappa
  • 1,876
  • 1
  • 21
  • 41
23
votes
8 answers

Including Async Function Within Firebase Cloud Functions (eslint "Parsing error: Unexpected token function")

Issue How can an async helper method be added to a Cloud Functions' index.js file? An async function is required in order to use await when converting fs.writefile into a Promise as explained in this StackOverflow post: fs.writeFile in a promise,…
AdamHurwitz
  • 9,758
  • 10
  • 72
  • 134
23
votes
2 answers

Firebase hosting deploy to other site

how to deploy to other firebase hosting sites defined within the same project. I created multiple firebase hosting "sites". The command firebase deploy however always deploys to the first one. How can I specify that the static files get deployed to…
Stefan
  • 381
  • 1
  • 2
  • 4
22
votes
6 answers

TypeError: Cannot read property 'wanted' of undefined:

I have been deploying functions with firebase successfully all day learning how to use it. I was trying to see what happened if I initialized another directory that deploys to the same project and had no problems until i updated my npm version and…
21
votes
4 answers

How to uninstall Firebase CLI (firebase-tools)

I install Firebase CLI (firebase-tools) https://github.com/firebase/firebase-tools by this code: curl -sL firebase.tools | bash How to uninstall it totally?
Yanni
  • 580
  • 2
  • 6
  • 21
21
votes
3 answers

Verbose logging of Firebase deploy?

Is it possible to get verbose logging in Firebase's deploy tool? I am trying to enable Angular Universal on my site, following this guide: https://hackernoon.com/deploying-angular-universal-v6-with-firebase-c86381ddd445 My app builds just fine,…
eat-sleep-code
  • 4,753
  • 13
  • 52
  • 98
20
votes
10 answers

Cloud Functions deploy error during lint on Windows: "enoent ENOENT: no such file or directory"

Following the firebase function getting started guide and getting a seemingly simple error once trying to deploy with: firebase deploy --only functions i deploying functions Running command: npm --prefix $RESOURCE_DIR run lint npm ERR! path…
19
votes
7 answers

Can't test cloud functions locally, emulator fails to start with TypeError: _onRequestWithOpts is not a function

When I try to start the shell for local testing from the functions directory in my project, the emulator starts but my functions are not able to be loaded. When I run "npm run build" I receive no errors. What is happening? I have tried removing the…
kreshendo
  • 384
  • 2
  • 18
19
votes
3 answers

Rewrite routes from hosting to cloud functions from other regions than us-central1

I have a http triggered cloud function deployed in the europe-west1 region and a web app hosted with firebase hosting. I have also setup a rewrite to that http function in my firebase.json file. I have noticed that the rewrite only works with…
17
votes
1 answer

Cloud Functions deployment fails: "Function failed on loading user code. Error message: Code in file lib/index.js can't be loaded."

I upgraded my firebase-functions module to 3.0.1. Now, when I deploy Cloud Functions, I get the warning message: ⚠ functions: Deploying functions to Node 6 runtime, which is deprecated. Node 8 is available and is the recommended runtime. Then,…
Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441
17
votes
9 answers

new project not showing up Firebase CLI

Was recently added to a new firebase project via the web interface but it isn't showing up in firebase list. I can see the project in my firebase console. I've tried restarting my terminal, logging out/in, and doing firebase use, but no avail. Any…
qunayu
  • 1,187
  • 1
  • 11
  • 18
17
votes
1 answer

firebase cli: firestore rules - how to specify the file to deploy

in the docs https://firebase.google.com/docs/firestore/security/get-started#use_the_firebase_cli I know i can deploy rules using: firebase deploy --only firestore:rules is there a way for me to specify the location of the rules file?
w--
  • 6,427
  • 12
  • 54
  • 92
1
2
3
54 55