I'm using Firebase Cloud Function and since recently, the logs show me this message:
The behavior for Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK. To hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore methods:
const firestore = new Firestore(); const settings = {/* your settings... */ timestampsInSnapshots: true}; firestore.settings(settings);
The problem is that when I add that piece of code into my functions file, I get this error every time I try to deploy:
ReferenceError: Firestore is not defined
Can somebody help me find what could be wrong?
(Do I need to add a Firestore dependence in the package.json file? Even if I don't need to do it whereas I already use the Firestore features?)
Thank you