firebase-tools

firebase_tools not found when trying to remove firestore collection from cloud functions

僤鯓⒐⒋嵵緔 提交于 2020-11-28 18:20:40
问题 I am trying to remove a collection using callable firebase function. I took a sample code from here. The sample code has a "firebase_tools" element. return firebase_tools.firestore .delete(path, { project: process.env.GCLOUD_PROJECT, recursive: true, yes: true, token: functions.config().fb.token }) Which apparently is not part of firebase-function I am getting following error in function logs: Unhandled error ReferenceError: firebase_tools is not defined The document also mentions that: You

firebase_tools not found when trying to remove firestore collection from cloud functions

*爱你&永不变心* 提交于 2020-11-28 18:10:30
问题 I am trying to remove a collection using callable firebase function. I took a sample code from here. The sample code has a "firebase_tools" element. return firebase_tools.firestore .delete(path, { project: process.env.GCLOUD_PROJECT, recursive: true, yes: true, token: functions.config().fb.token }) Which apparently is not part of firebase-function I am getting following error in function logs: Unhandled error ReferenceError: firebase_tools is not defined The document also mentions that: You

Cloud Functions Firebase CLI predeploy error (typescript)

本小妞迷上赌 提交于 2020-08-21 13:57:28
问题 I´m trying Cloud Functions with typescript. After successfully installed, added a trigger and tested deploy. index.ts import * as functions from 'firebase-functions'; export const createAccount = functions.auth.user().onCreate(event => { const user = event.data; console.log('user displayname', user.displayName); return; }); command firebase deploy --only functions === Deploying to 'project'... i deploying functions i functions: running predeploy script. > functions@ build D:\vmbox\project

Firebase tools login from command line

对着背影说爱祢 提交于 2020-08-06 12:51:24
问题 I'm using Codeship to deploy a firebase app. In order to do so, I first need to login using the firebase login command. Problem is, I need to login in the browser and then return to the command line and perform the deployment. Is there an automated way to supply credentials to Firebase? Cheers 回答1: See wvm2008's answer for a more up to date version One option would be to mint a token for the build server and pass it into the CLI with: firebase --token <token> You can also get a token from a

-bash: firebase: command not found

﹥>﹥吖頭↗ 提交于 2020-06-26 03:52:50
问题 I need to host website to google firebase hosting. I looked almost everywhere but steel have the problem. I have installed npm install --global firebase also npm install -g firebase-tools but when I want to use firebase command it says : "command not found" firebase-tools "-bash: firebase: command not found" Firebase Hosting set up issue https://github.com/firebase/firebase-tools/issues/46 this posts didn't helped this is after sudo npm install --global firebase-tools 回答1: alias firebase="

-bash: firebase: command not found

荒凉一梦 提交于 2020-06-26 03:52:10
问题 I need to host website to google firebase hosting. I looked almost everywhere but steel have the problem. I have installed npm install --global firebase also npm install -g firebase-tools but when I want to use firebase command it says : "command not found" firebase-tools "-bash: firebase: command not found" Firebase Hosting set up issue https://github.com/firebase/firebase-tools/issues/46 this posts didn't helped this is after sudo npm install --global firebase-tools 回答1: alias firebase="

Run firebase emulators on github actions

僤鯓⒐⒋嵵緔 提交于 2020-06-16 02:37:40
问题 I'm trying to run my test on Github Actinos but after several attempts I was not able to do so. Receiving Error: firestore: Firestore Emulator has exited because java is not installed, you can install it from https://openjdk.java.net/install/ - name: Test uses: w9jds/firebase-action@v1.3.1 env: JAVA_HOME: ${{ env.JAVA_HOME }} FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} GCLOUD_PROJECT: ${{ secrets.nextGCLOUD_PROJECT }} PROJECT_ID: ${{ secrets.nextFIREBASE_PROJECTID }} with: args: | setup

Firestore local http with real db: The Cloud Firestore emulator is not running so database operations will fail with a 'default credentials' error

99封情书 提交于 2020-05-29 09:51:10
问题 I want to run a firebase http cloud function locally accessing a real remote firestore database. To do it, I'm running my functions locally using: FIREBASE_CONFIG="/path-to-credential.json" GOOGLE_APPLICATION_CREDENTIALS="/path-to-credential.json" firebase emulators:start --only functions As written here https://firebase.google.com/docs/admin/setup, this should permit the initialization of the admin sdk without any parameter. My functions index.js is as following import * as admin from