腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
精选内容/技术社群/优惠产品,
尽在小程序
立即前往
文章
问答
(9999+)
视频
沙龙
1
回答
Firebase
云
函数
错误
,
返回
的
函数
未定义
,
应为
Promise
或
value
javascript
、
node.js
、
firebase
、
firebase-realtime-database
、
firebase-admin
我有一个
云
函数
,它在特定
的
数据库写入(OnCreate)时触发,它按预期工作,但它也抛出
错误
“
函数
返回
未定义
,预期
的
承诺
或
值”,尽管我
返回
了一个承诺。附加下面的代码片段。这里面有嵌套
的
承诺。有没有更好
的
方法来处理嵌套
的
承诺,我已经检查了很多帖子
的
嵌套
的
承诺,但无法找到一个适当
的
解决方案。var globalDa
浏览 15
提问于2019-03-21
得票数 1
2
回答
Firebase
云
函数
-
函数
返回
未定义
、预期
的
Promise
或
value
javascript
、
firebase
、
google-cloud-functions
、
mailgun
我已经阅读了其他线程,并试图向我
的
云
函数
返回
一些东西,但它仍然给出了相同
的
函数
返回
未定义
,预期
的
承诺
或
值警告……这里我漏掉了什么?基本上,我使用emails js向用户和管理员发送了两封电子邮件,即使发送成功了,我
的
日志中仍然会收到相同
的
警告。
浏览 0
提问于2018-01-02
得票数 0
1
回答
更新集合中
的
防火墙
云
函数
错误
javascript
、
node.js
、
firebase
、
google-cloud-firestore
、
google-cloud-functions
我试图使用
云
函数
,以便当在集合'RecruiterJobs‘中创建文档时,
云
函数
被触发并更新集合'CollegeCode’
的
文档中
的
值,并且根据条件或者单个文档
或
集合
的
所有文档都要更新,下面是
云
函数
的
index.jscatch(() => null) }).catch(() =&g
浏览 3
提问于2020-06-08
得票数 0
回答已采纳
1
回答
在具有两个
或
多个
返回
承诺
的
方法
的
Firebase
函数
中
返回
什么?
javascript
、
node.js
、
firebase
、
google-cloud-functions
我有一个
云
函数
,它侦听
Firebase
Database中
的
更改,并使用
返回
promise
的
函数
进行响应。) { } // Removes the
value
浏览 0
提问于2018-01-20
得票数 1
回答已采纳
1
回答
Firebase
:
函数
返回
未定义
、预期
的
Promise
或
value
javascript
、
firebase
、
google-cloud-functions
我正在编写一个
Firebase
函数
,其中我遵循了中示例代码
的
代码,但是,在我
的
Firebase
函数
日志中,我始终得到
错误
Function returned undefined, expected
Promise
or
value
。我几乎修改了我
的
代码,使其完全相同,但没有任何喘息之机。有人试过这个代码吗?它是无
错误
的
吗?为什么我会得到这个
错误
?同样
的</em
浏览 6
提问于2017-12-25
得票数 3
回答已采纳
1
回答
计划
云
函数
错误
:
函数
返回
未定义
、预期
的
promise
或
value
node.js
、
firebase
、
google-cloud-functions
我正在尝试创建一个预定
的
云
函数
,该
函数
使用api调用中
的
值更新文档字段。然而,我在日志中得到了上面提到
的
错误
,尽管我
返回
了一个
promise
(据我所知) 任何帮助都是优先
的
api调用
返回
以下json: { "alarm": "false" } 我
的
代码: import* as functions from '
fireba
浏览 23
提问于2019-05-08
得票数 0
回答已采纳
1
回答
函数
在
Firebase
云
节点
函数
中
返回
未定义
、预期
的
Promise
或
value
node.js
、
firebase
、
amazon-ec2
、
cloud
、
google-cloud-functions
我在
firebase
函数
日志中看到这个
错误
,
函数
部署成功。产生
错误
的
代码如下所示 .onUpdate日志显示: 12:01:55.596 PM restartAWS_Instance Function returned undefined, expected
Promise
浏览 1
提问于2018-06-07
得票数 0
1
回答
在反应中,为什么我要让这些
错误
围绕着承诺?
javascript
、
reactjs
、
typescript
我正在将
Firebase
集成到我
的
React应用程序中,并使用TypeScript。
Firebase
;第二:从组件
浏览 6
提问于2021-03-09
得票数 0
1
回答
如何在
Firebase
的
定时任务中执行NumChildren()?
node.js
、
firebase
、
firebase-realtime-database
、
google-cloud-platform
、
google-cloud-functions
我试着每5分钟数一次孩子
的
数量。我一直在尝试编写一段代码,每X分钟运行一次,每次运行时,它都会计算子对象
的
数量。我已经将
Firebase
文档中
的
预定
函数
和快照
的
代码拼凑在一起,但我可能遗漏了一些东西。().ref("location/"); .then(function(snapshot) { var a = snapshot.numChildren();
浏览 0
提问于2019-06-15
得票数 0
3
回答
固定恢复中
的
云
函数
FieldValue增量TypeError
typescript
、
firebase
、
google-cloud-firestore
、
google-cloud-functions
、
firebase-tools
我在
firebase
模拟器中测试
云
函数
,并在尝试增加
云
火药库中
的
字段时出错。请检查我
的
代码和
错误
信息下面。谢谢你
的
帮助!import * as functions from "
firebase
-functions"; }, {merge:
浏览 12
提问于2022-07-22
得票数 3
回答已采纳
4
回答
Cloud Functions for
Firebase
-序列化
返回
值时出错:
javascript
、
node.js
、
firebase
、
firebase-realtime-database
、
google-cloud-functions
我有一个Cloud
函数
,用于交叉引用两个列表,并在列表中找到彼此匹配
的
值。这个
函数
似乎工作正常,但是在日志中我一直看到这个Error serializing return
value
: TypeError: Converting circular structure to JSON下面是
函数
... exports.crossReferenceContacts = functions.database.ref('/cross-ref-contacts/{userId}'
浏览 0
提问于2017-06-28
得票数 16
1
回答
Google Cloud Function有时有效,有时不起作用
javascript
、
node.js
、
firebase
、
google-cloud-firestore
、
google-cloud-functions
我使用Firestore
的
onCreate
函数
来检测用户注册并使用他
的
用户id创建文档。问题是这个
函数
有时起作用,但在其他时候就不起作用了。此外,每当
函数
运行时,我都会收到“
函数
返回
未定义
,预期
的
承诺
或
值”
错误
。我尝试了许多类似问题
的
解决方案,但仍然没有成功。
浏览 13
提问于2019-11-02
得票数 0
回答已采纳
2
回答
云
函数
onUpdate:无法读取
未定义
的
属性“forEach”
javascript
、
node.js
、
firebase
、
google-cloud-functions
、
google-cloud-storage
现在我正在尝试更新我
的
项目中
的
图片。我可以更新
云
火商店
的
图片网址。而且,我还想使用
firebase
云
函数
从
云
存储中删除前面的图片。我在“产品”收藏中有“样品”字段。当更新"sample“字段中
的
图片时,我希望删除
云
存储中
的
原始图片。 但我在
云
浏览 2
提问于2020-11-16
得票数 0
回答已采纳
1
回答
Firebase
循环失败并
返回
错误
(
函数
返回
未定义
、预期
的
Promise
或
value
)
node.js
、
firebase
、
google-cloud-firestore
、
nodemailer
我
的
第二个等待循环似乎由于某种原因不能工作,因为我得到了
错误
Function returned undefined, expected
Promise
or
value
,我不确定如何构造这段代码来执行
函数
浏览 0
提问于2021-10-28
得票数 0
2
回答
错误
:
函数
返回
未定义
、预期
的
Promise
或
value
node.js
、
firebase
、
express
、
google-cloud-firestore
、
google-cloud-functions
我设置了一个带有
firebase
函数
的
pubsub
函数
,以便在Firestore中频繁地执行一些操作。为此,我需要向第三方API发出请求,以获取更新后
的
数据,然后将该数据插入Firestore中正确
的
集合和文档中。const request_
promise
= require('request-
promise
') exports.scheduledFunction = functions.pubsub.scheduleuser:
浏览 8
提问于2019-07-08
得票数 0
回答已采纳
1
回答
Firebase
返回
函数
上
的
布尔值作为条件
javascript
、
node.js
、
firebase
我在我
的
firebase
云
函数
上有一个
函数
,用于检查key是否存在: var exists; var
promise
= query.once("
value
").then(function (snapshot) { /
浏览 8
提问于2017-07-14
得票数 0
1
回答
Firebase
函数
- npm依赖项
的
“
未定义
”
错误
&包括一个带有客户端代码
的
模块
node.js
、
firebase
、
google-cloud-functions
我正在用
Firebase
开发一个应用程序,我使用
云
函数
来生成QR代码等。1,我试图在
云
函数
中使用 npm包。这是package.js文件在functions目录中
的
相关部分: "
firebase
-admin": "~5.8.1", "
firebase
-functions": "^0.8.1&qu
浏览 1
提问于2018-02-27
得票数 0
1
回答
Firebase
函数
.onWrite总是记录为空
或
未定义
firebase
、
firebase-realtime-database
、
google-cloud-platform
、
google-cloud-functions
我不明白为什么这只会记录“空”
或
“
未定义
”到控制台
的
任何东西。我在Google平台上测试浏览器界面。我还尝试过用相同
的
结果记录事件(而不是更改和上下文)。我也尝试过打开安全规则,但这也没有帮助。任何建议都是非常感谢
的
。const functions = require('
firebase
-functions');admin.initializeAp
浏览 0
提问于2018-05-06
得票数 0
回答已采纳
1
回答
函数
部署
错误
Firebase
android
、
firebase
、
google-cloud-functions
我尝试在
firebase
函数
上发布简单代码,但每次都会生成
错误
functions: Finished running predeploy script.
firebase
deploy --except functions 'use strict' const f
浏览 0
提问于2018-04-04
得票数 3
1
回答
Create user with email and password
返回
具有
未定义
值
的
非空用户
javascript
、
firebase
、
firebase-authentication
我有以下代码;它成功地创建了用户并
返回
了一个
promise
。根据文档,它在完成时
返回
一个非空用户,但是,当我尝试打印出电子邮件
或
发送验证电子邮件时,我得到“
未定义
”和"sendVerificationEmail不是一个
函数
“function register(){ var password = document.ge
浏览 0
提问于2016-10-21
得票数 0
点击加载更多
扫码
添加站长 进交流群
领取专属
10元无门槛券
手把手带您无忧上云
相关
资讯
深入理解Promise
ES6之Promise的使用
图解JavaScript——代码实现(六种异步方案,重点是Promise、Async、发布/订阅原理实现,真香)
关于ES6的Promise对象和用法
Javascript之async四重奏
热门
标签
更多标签
云服务器
即时通信 IM
ICP备案
对象存储
实时音视频
活动推荐
运营活动
广告
关闭
领券