в разделе облачных функций вы можете увидеть ограничение в GCD (Google Cloud Platform)

аюсь развернуть пример fireabase, но когда я пытаюсь развернуть его, CLI запускает ошибку:

[КОД]

const functions = require('firebase-functions'); //to activate firebase functions

const admin = require('firebase-admin'); //to active firebase database permissions

admin.initializeApp(functions.config().firebase);

exports.addMessage = functions.https.onRequest((req, res) => {
// [END addMessageTrigger]
  // Grab the text parameter.
  const original = req.query.text;
  // [START adminSdkPush]
  // Push the new message into the Realtime Database using the Firebase Admin SDK.
  admin.database().ref('/messages').push({original: original}).then(snapshot => {
    // Redirect with 303 SEE OTHER to the URL of the pushed object in the Firebase console.
    res.redirect(303, snapshot.ref);
  });
  // [END adminSdkPush]
});

[ОШИБКА]

  15:3   error  Expected catch() or return                  promise/catch-or-return
  15:69  error  Each then() should return a value or throw  promise/always-return

✖ 2 problems (2 errors, 0 warnings)


npm ERR! Darwin 17.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "--prefix" "/Users/user/test/functions" "run" "lint"
npm ERR! node v6.10.2
npm ERR! npm  v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! functions@ lint: `eslint .`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the functions@ lint script 'eslint .'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the functions package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     eslint .
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs functions
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls functions
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/eliassebastian/Developer/npm-debug.log

Error: functions predeploy error: Command terminated with non-zero exit code1

Я смотрю на оригинальный финал, предоставленный firebaseВот

Я новичок в Javascript и во всем этом мире, так что я действительно потерян с этим типом сообщений.

Как я могу решить это?

Ответы на вопрос(2)

Ваш ответ на вопрос