0

when i try to deployee function it gives some issues. below is my code

const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp();

exports.addNewMessage = functions.https.onRequest((req, res) => {
   // Grab the text parameter.
  const original = req.query.text;
  // Push the new message into the Realtime Database using the Firebase Admin SDK.
  return 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.
    return res.redirect(303, snapshot.ref.toString());
  });

});

when i am trying to deploye i face issue enter link description here

enter image description here

i don't understand what is issue exactly . for firebase-admin module is there need to enable or set Environment Configuration ? if yes then how ? i dont find this any document i any one no please help me

0

1 Answer 1

1

This was solved in the latest version of firebase-tools, version 3.18.2:

Fixed issue where some users encountered "Failed to parse app options file: Error: ENOENT: no such file or directory" during functions deployment.

to upgrade:

npm install -g [email protected]

more info here: https://github.com/firebase/firebase-tools/releases/tag/v3.18.2

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.