firebase-cli

What is the JSON format for a firestore individual field index within a collection group query?

僤鯓⒐⒋嵵緔 提交于 2020-04-16 03:56:06
问题 We can now retrieve documents from a collection group which is great. To do so, I need to create an index through an error message on the Firebase console. How can I add this new index to the firestore.indexes.json file? Example of the documentation: let museums = db.collectionGroup('landmarks').where('type', '==', 'museum'); museums.get().then(function(querySnapshot) { querySnapshot.forEach(function(doc) { console.log(doc.id, ' => ', doc.data()); }); }); 回答1: At the top level of your index

What is the JSON format for a firestore individual field index within a collection group query?

纵然是瞬间 提交于 2020-04-16 03:55:00
问题 We can now retrieve documents from a collection group which is great. To do so, I need to create an index through an error message on the Firebase console. How can I add this new index to the firestore.indexes.json file? Example of the documentation: let museums = db.collectionGroup('landmarks').where('type', '==', 'museum'); museums.get().then(function(querySnapshot) { querySnapshot.forEach(function(doc) { console.log(doc.id, ' => ', doc.data()); }); }); 回答1: At the top level of your index

How to get the measurementId from the Firebase config?

偶尔善良 提交于 2020-04-07 08:33:05
问题 To play with Google Analytics for Web based projects on Firebase we need to use either the Firebase reserved URLs or to copy/update the Firebase config object as the documentation states here. I am using the following command to print that config information though: firebase setup:web . The problem is that it is not printing the measurementId field. What should I do now? 回答1: In fact the firebase setup:web is not printing the measurementId . But if you refer to Firebase CLI reference you can

error: unknown option '--inspect-functions' return when adding --inspect-functions to firebase emulators:start

假装没事ソ 提交于 2020-03-26 04:03:33
问题 I cant figure out why when I pass in the option --inspect-functions to firebase emulators:start I get an error saying error: unknown option '--inspect-functions' But when I run firebase emulators:start with any options the emulator runs perfectly, So I am bit stumped and would appreciate any help. This is my functions/package.json : { "name": "functions", "description": "Cloud Functions for Firebase", "scripts": { "lint": "eslint .", "serve": "firebase serve --only functions", "shell":

error: unknown option '--inspect-functions' return when adding --inspect-functions to firebase emulators:start

时光总嘲笑我的痴心妄想 提交于 2020-03-26 04:03:11
问题 I cant figure out why when I pass in the option --inspect-functions to firebase emulators:start I get an error saying error: unknown option '--inspect-functions' But when I run firebase emulators:start with any options the emulator runs perfectly, So I am bit stumped and would appreciate any help. This is my functions/package.json : { "name": "functions", "description": "Cloud Functions for Firebase", "scripts": { "lint": "eslint .", "serve": "firebase serve --only functions", "shell":

Why is angular fire saying I'm not logged in even though firebase tools says I am?

♀尐吖头ヾ 提交于 2020-03-05 03:01:32
问题 I'm having an issue with my ng add @angular/fire command and I think this might have something to do with it. below is a screenshot of me checking my login by running firebase login, it clearly says I'm logged in. then I run a deploy to firebase command and it says "🚨 You're not logged into Firebase. Logging you in..." Date: 2020-01-12T23:18:12.366Z - Hash: 0398eefc1b5a238b8b7e - Time: 37932ms 🚀 Your application is now available at https://devinterface-78409.firebaseapp.com/ Raphaels-MacBook

firebase-tools “Error: certificate has expired”

你离开我真会死。 提交于 2020-02-27 14:09:13
问题 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 error! I tried it on other projects with the same result. So I believe this error is not related to a specific project and it has something to do with firebase-tools . Here is the error log: [debug] [debug] [2020-01-07T03:37:57.789Z] > command

Firebase cannot understand what targets to deploy

寵の児 提交于 2020-02-01 16:39:05
问题 When deploying the following hello-world equivalent code I get the error shown in the end:- $ ls -lR .: total 8 -rw-r--r-- 1 hgarg hgarg 3 Aug 29 14:55 firebase.json drwxr-xr-x 2 hgarg hgarg 4096 Aug 29 11:56 functions ./functions: total 4 -rw-r--r-- 1 hgarg hgarg 1678 Aug 29 11:56 index.js firebase.json looks like this:- {} and index.json like this:- 'use strict'; const functions = require('firebase-functions'); exports.search = functions.https.onRequest((req, res) => { if (req.method ===

ESLint error trying to deploy functions Firebase

喜欢而已 提交于 2020-01-20 04:09:08
问题 I'm try to deploy fireabase example , but when I try to deploy it , CLI launches an error: [CODE] const functions = require('firebase-functions'); //to activate firebase functions const admin = require('firebase-admin'); //to active firebase database permissions admin.initializeApp(functions.config().firebase); exports.addMessage = functions.https.onRequest((req, res) => { // [END addMessageTrigger] // Grab the text parameter. const original = req.query.text; // [START adminSdkPush] // Push

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

天大地大妈咪最大 提交于 2019-12-31 12:59:48
问题 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 us-central1 functions. Is there a way to make the rewrite work with europe-west1 functions? 回答1: Now that there is official support for other regions it states in the docs that " If you are using HTTP functions to serve dynamic content for hosting, you