Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 138192

Error: Value for argument "value" is not a valid query constraint. Cannot use "undefined" as a Firestore value

$
0
0

I am getting this error when i am exporting modules from file A and importing in file B and when i am running file B it gives that error.that is related to Firebase cloud Firestore.

const mailEvents = (startTime, endTime) => {

  serverRef = db.collection("MailEvents");
  let getDocs = serverRef
    .where("timestamp", ">=", startTime)
    .where("timestamp", "<=", endTime)
    .get()
    .then(querySnapshot => {
      if (querySnapshot) {
        let docs = querySnapshot.docs.map(doc => doc.data());
        console.log(docs)
      }
    });
}
mailEvents();
module.exports.mailEvents = mailEvents;

and the main.js file is

const module = require('./report.js')

module.mailEvents(1575225929,1575305012);

Viewing all articles
Browse latest Browse all 138192

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>