FieldValue undefined when using functions and Firestore

前端 未结 2 1851
别那么骄傲
别那么骄傲 2020-12-15 03:56

I have the following function:

const functions = require(\'firebase-functions\');
const admin = require(\'firebase-admin\');
const FieldValue = require(\'fir         


        
2条回答
  •  失恋的感觉
    2020-12-15 04:29

    Turns out it was a mistake in the documentation, the correct import should have been const FieldValue = require('firebase-admin').firestore.FieldValue;

    Update

    It should be said that Firebase responded within hours and are correcting the docs asap.

提交回复
热议问题