这是我第一次使用dialogflow实现库,以下是要求 // The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers.
const functions = require('firebase-functions');
// The Firebase Admin SDK to access the Firebase Realtime Database.
const admin = require('firebase-admin');
var db =
我有一个使用whereIn子句的查询,但是当我部署它并通过作业运行它时,它会删除这个错误。
Error: Value for argument "opStr" is invalid. Acceptable values are: <, <=, ==, >, >=, array-contains, in, array-contains-any
at Object.validateEnumValue (/workspace/node_modules/@google-cloud/firestore/build/src/validate.js:294:1
在一些教程之后,我能够将我的Next.js应用程序部署到Firebase主机/函数。下面是我的项目的简化文件夹结构:
myApp
node_modules // Next.js app dependencies
.next // destination of npm run build of the Next.js project
pages // Next.js pages
functions
lib // this is where the functions compile
node_modules // functions' dependenci
在部署带有firebase函数的代码时,我会得到一个错误,如下所示。我得到了这两个函数中的错误。我认为这个错误与密码库有关。如果你能帮忙就太好了。我的应用程序是一个端到端的加密消息应用。
我的打字码:
import * as functions from 'firebase-functions';
import * as admin from 'firebase-admin';
import * as crypto from 'crypto-ts';
admin.initializeApp(functions.config());
const
我在windows 10机器上本地运行所有的firebase模拟器。但是,由于函数dir位于不同的项目/位置,因此我将分别运行函数模拟器。似乎触发器没有被模仿,我得到了下面的警告。除了触发器/背景函数之外,所有东西似乎都正常工作。
有什么解决办法吗?
i emulators: Starting emulators: functions
! hub: emulator hub unable to start on port 4400, starting on 4401 instead.
! emulators: It seems that you are running multiple
在对应用程序中的用户进行身份验证后,我想创建一个云函数,该函数在我的firestore userProfile集合中为用户创建一个用户配置文件文档。
这是我用于云函数的整个index.js文件
// The Cloud Functions for Firebase SDK to create Cloud Functions and setup triggers.
const functions = require('firebase-functions');
// The Firebase Admin SDK to access the Firebase Realtime D
当我通过在函数文件夹中运行命令firebase-tools将我的sudo npm i -g firebase-tools从8.6.0版本升级到8.7.0时,我会得到以下警告:
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
/.npm/bin/firebase -> /.npm/lib/node_modules/firebase-tools/lib/bin/firebase.js
npm WARN ws@7.3.1 requires a peer of bufferutil@^4.0
我正在学习教程,尝试将一些函数部署到Firebase,并且我可以成功地将它们部署到我的项目id中。在访问提供的URL上的下列函数时,我得到错误:无法处理请求
// The Cloud Functions for Firebase SDK to create Cloud Functions and setup
triggers.
const functions = require('firebase-functions');
// The Firebase Admin SDK to access the Firebase Realtime Database.
const a
假设我的Firebase应用程序在我的functions文件夹中有以下结构。
functions
> node_modules // INSTALLED NODE MODULES
> distApp // REACT APP FILES TRANSPILED WITH BABEL
App.js
index.html
> distFunctions // FUNCTION FILES TRANSPILED WITH BABEL
function1.js // SOME OF THEM U
在编写一个在创建用户时触发的简单示例函数时出现以下错误。
代码:
exports.createUser = functions.firestore
.document('users/{userId}')
.onCreate((snap, context) => {
const newValue = snap.data();
const name = newValue.name;
//....do some stuff here
});
错误描述:
Error: Cloud function needs to be called with
最近,当我尝试部署到Firebase时(在过去成功地部署了这个错误),我开始收到下面的错误。我不知道这会发生什么改变。如果我运行firebase来在本地主机上服务,那么一切都很好。我的package.json和index.js的要求也在下面。
i deploying functions, hosting
i functions: ensuring necessary APIs are enabled...
i runtimeconfig: ensuring necessary APIs are enabled...
+ runtimeconfig: all necessary APIs