google-cloud-functions

Google Cloud Functions Build failed: function.js does not exist; Error ID: 7485c5b6

两盒软妹~` 提交于 2021-01-24 20:22:07
问题 I generated a demo express server using these steps: npm install -g express-generator express myExpressApp --view pug Needless to say, the app runs fine on my local machine ( npm start ) I then pushed the code to Cloud Source Repositories Then deploy to Google Cloud Functions through their web app What am I missing? Source codes of my generated demo app: /myExpressApp/app.js var createError = require('http-errors'); var express = require('express'); var path = require('path'); var

Google Cloud Functions Build failed: function.js does not exist; Error ID: 7485c5b6

邮差的信 提交于 2021-01-24 20:20:47
问题 I generated a demo express server using these steps: npm install -g express-generator express myExpressApp --view pug Needless to say, the app runs fine on my local machine ( npm start ) I then pushed the code to Cloud Source Repositories Then deploy to Google Cloud Functions through their web app What am I missing? Source codes of my generated demo app: /myExpressApp/app.js var createError = require('http-errors'); var express = require('express'); var path = require('path'); var

Google Cloud Functions Build failed: function.js does not exist; Error ID: 7485c5b6

一曲冷凌霜 提交于 2021-01-24 20:20:31
问题 I generated a demo express server using these steps: npm install -g express-generator express myExpressApp --view pug Needless to say, the app runs fine on my local machine ( npm start ) I then pushed the code to Cloud Source Repositories Then deploy to Google Cloud Functions through their web app What am I missing? Source codes of my generated demo app: /myExpressApp/app.js var createError = require('http-errors'); var express = require('express'); var path = require('path'); var

Google Cloud Functions Build failed: function.js does not exist; Error ID: 7485c5b6

微笑、不失礼 提交于 2021-01-24 20:16:03
问题 I generated a demo express server using these steps: npm install -g express-generator express myExpressApp --view pug Needless to say, the app runs fine on my local machine ( npm start ) I then pushed the code to Cloud Source Repositories Then deploy to Google Cloud Functions through their web app What am I missing? Source codes of my generated demo app: /myExpressApp/app.js var createError = require('http-errors'); var express = require('express'); var path = require('path'); var

Expected catch() or return (promise/catch-or-return)

↘锁芯ラ 提交于 2021-01-22 08:57:59
问题 I am new to JavaScript.This is my first function in javascript to deploy a function on the firebase. Got this error: - [eslint] Unexpected function expression. (prefer-arrow-callback) - [eslint] Expected catch() or return (promise/catch-or-return) What is wrong with this function? const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.grantSignupReward = functions.database.ref('/users/{uid}/last

How can I call local Firebase Functions (in Emulator) from Flutter?

不想你离开。 提交于 2021-01-20 12:06:39
问题 I set up Cloud Functions in the local emulator. I wrote a few functions and tested them in the browser with the function emulator. Now I am trying to call these functions from my local Flutter app without deploying them. However, i cannot find a way to connect my Flutter App to the localhost API of the functions. Is there anyway to do that? 回答1: In steps: Import the package: import 'package:cloud_functions/cloud_functions.dart'; Create an instance: static final _functions = CloudFunctions

How can I call local Firebase Functions (in Emulator) from Flutter?

与世无争的帅哥 提交于 2021-01-20 12:06:09
问题 I set up Cloud Functions in the local emulator. I wrote a few functions and tested them in the browser with the function emulator. Now I am trying to call these functions from my local Flutter app without deploying them. However, i cannot find a way to connect my Flutter App to the localhost API of the functions. Is there anyway to do that? 回答1: In steps: Import the package: import 'package:cloud_functions/cloud_functions.dart'; Create an instance: static final _functions = CloudFunctions

How can I call local Firebase Functions (in Emulator) from Flutter?

大城市里の小女人 提交于 2021-01-20 12:05:51
问题 I set up Cloud Functions in the local emulator. I wrote a few functions and tested them in the browser with the function emulator. Now I am trying to call these functions from my local Flutter app without deploying them. However, i cannot find a way to connect my Flutter App to the localhost API of the functions. Is there anyway to do that? 回答1: In steps: Import the package: import 'package:cloud_functions/cloud_functions.dart'; Create an instance: static final _functions = CloudFunctions

Activate retry in firebase cloud function programmatically

怎甘沉沦 提交于 2021-01-19 05:55:58
问题 i'm deploying firebase cloud functions to listen on changes in our firestore via continuous deployment. I can only find a way to activate retries manually. Which goes contrary to our cd approach. Looking at the normal gcp cloud functions the retry flag can be given when deploying. But i cannot find a similar option in the firebase-cli or the firebase-functions interface (2.1.0) Any hints on how to solve this? Carsten 回答1: There is currently no similar option for deployment using the Firebase

How to iterate through a Firestore snapshot documents while awaiting

半腔热情 提交于 2021-01-07 04:07:38
问题 I have been trying to obtain a series of documents from firestore, reading them and acting accordingly depending on a series of fields. The key part is I want to wait for a certain process while working on each document. The official documentation presents this solution: const docs = await firestore.collection(...).where(...).where(...).get() docs.forEach(await (doc) => { //something }) The problem with this solution is taht when you have a promise inside the forEach it won't await it before