【发布时间】:2018-09-13 06:33:06
【问题描述】:
我正在尝试在 firebase 函数上发布简单代码,但每次都会产生错误
errors
functions: Finished running predeploy script.
i functions: ensuring necessary APIs are enabled...
✔ functions: all necessary APIs are enabled
i functions: preparing functions directory for uploading...
i functions: packaged functions (53.73 KB) for uploading
✔ functions: functions folder uploaded successfully
i functions: updating function sendNotification...
⚠ functions[sendNotification]: Deployment error.
Error setting up the execution environment for your function. Please
try again after a few minutes.
Functions deploy had errors. To continue deploying other features (such as database), run:
firebase deploy --except functions
Error: Functions did not deploy properly.
我尝试部署的代码是
'use strict'
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
exports.sendNotification = functions.database.ref('/notifications/{user_id}/{notification_id}').onWrite(event => {
const user_id = event.params.user_id;
const notification_id = event.params.notification_id;
console.log('We have a notification from : ', user_id);
});
面对这个错误大约 2 天,尝试堆栈和其他论坛上提供的所有答案,但可以找到任何人都可以在此帮助我的任何解决方案
【问题讨论】:
-
请联系 Firebase 支持。 firebase.google.com/support/contact/troubleshooting
标签: android firebase google-cloud-functions