相关疑难解决方法(0)

尝试部署firebase函数时出现ESLint错误

我尝试部署firebase函数,但由于ESLint的某些问题,它一直在失败.我也试过谷歌搜索答案,但我看到的一切都是希腊语给我.

我也偶然发现了这个这个答案,但似乎它们不适用于我的场景.

我的功能

// // Create and Deploy Your First Cloud Functions
// // https://firebase.google.com/docs/functions/write-firebase-functions
//
// exports.helloWorld = functions.https.onRequest((request, response) => {
//  response.send("Hello from Firebase!");
// });


//import firebase functions modules
const functions = require("firebase-functions");
//import admin module
const admin = require("firebase-admin");
admin.initializeApp(functions.config().firebase);

// Listens for new messages added to messages/:pushId
exports.pushNotification = functions.database.ref("/Message").onWrite( event => {
    //  Grab the current value of what was written to the Realtime Database.
    var valueObject = event.data.val(); …
Run Code Online (Sandbox Code Playgroud)

node.js firebase eslint google-cloud-functions firebase-cli

12
推荐指数
4
解决办法
9338
查看次数