admin管理员组文章数量:1391918
I'm attempting to use Object.values()
in one of my Firebase Cloud Functions, but it isn't recognized as a function. I assume this means that es7 functions aren't available on Firebase Cloud Functions. My question is two-fold:
First, is this true? Second, I recognize that the function isn't supported by some browsers, but I wonder if that's important for Firebase Cloud Functions. Can anyone explain this to me?
I'm attempting to use Object.values()
in one of my Firebase Cloud Functions, but it isn't recognized as a function. I assume this means that es7 functions aren't available on Firebase Cloud Functions. My question is two-fold:
First, is this true? Second, I recognize that the function isn't supported by some browsers, but I wonder if that's important for Firebase Cloud Functions. Can anyone explain this to me?
Share Improve this question asked Mar 23, 2017 at 4:37 J. Adam ConnorJ. Adam Connor 1,7344 gold badges21 silver badges38 bronze badges3 Answers
Reset to default 7According to node.green, Firebase only supports the LTS version of Node which is currently at the version 6.10.x and Object.values
is still behind experimental flag in Node 6.10.x.
Hope this cleared your doubt!
Ran into the same issue. check out this answer that remends using the Object.keys
function and chaining it to the built in map
function that es with the array prototype.
Node 8 is available for cloud functions now. Try upgrading your environment.
You probably just need to:
- Add "engines": { "node": "8" } to your /functions/package.json. Example.
In case it still doesn't work:
- Upgrade your firebase-functions to the latest version
- Upgrade firebase-tools to the latest version
本文标签: javascriptObjectvalues() in Firebase Cloud FunctionsStack Overflow
版权声明:本文标题:javascript - Object.values() in Firebase Cloud Functions - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744775666a2624606.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论