flamelink / flamelink-js-sdk

🦊 Official Flamelink JavaScript SDK for both the Firebase Realtime database and Cloud Firestore
https://flamelink.github.io/flamelink-js-sdk
MIT License
43 stars 5 forks source link

Error when calling content.update() #193

Open ptreitler opened 2 years ago

ptreitler commented 2 years ago

I'm getting an error when using content.update() :

~\flamelink-import\node_modules\@flamelink\sdk-content-cf\dist\cjs\index.js:2358
                                    payload['_fl_meta_.createdFromLocale'] = firestoreService.FieldValue.delete();
                                                                                              ^
TypeError: Cannot read properties of undefined (reading 'FieldValue')
    at Object.<anonymous> (~\flamelink-import\node_modules\@flamelink\sdk-content-cf\dist\cjs\index.js:2358:95)
    at step (~\flamelink-import\node_modules\@flamelink\sdk-content-cf\dist\cjs\index.js:80:23)
    at Object.next (~\flamelink-import\node_modules\@flamelink\sdk-content-cf\dist\cjs\index.js:61:53)
    at fulfilled

I'm using the Firebase admin SDK and the Flamelink SDK (v1.0.0-rc.1) with the following modules:

import admin, { ServiceAccount } from "firebase-admin"
import flamelink from "flamelink/app"
import "flamelink/content"
import "flamelink/settings"
ptreitler commented 2 years ago

Workaround: Downgrading to firebase-admin@9.12.0 seems to fix this problem.

moschan commented 1 year ago

It also works for me. Thanks!