jloosli / node-firestore-import-export

Firestore data import and export
https://www.npmjs.com/package/node-firestore-import-export
MIT License
388 stars 78 forks source link

Can not import data to the emulator #859

Open pascalbe-dev opened 1 year ago

pascalbe-dev commented 1 year ago

When running an import for the local emulator, the data is not really imported to the firestore emulator.

Steps to reproduce the behavior

Expected behavior

Actual behavior

Final thoughts

So, basically, I see two problems:

cuong0993 commented 1 year ago

Forked here https://github.com/cuong0993/node-firestore-import-export

Pass GOOGLE_CLOUD_PROJECT and FIRESTORE_EMULATOR_HOST to connect with emulator. For example,

GOOGLE_CLOUD_PROJECT=demo- FIRESTORE_EMULATOR_HOST=localhost:8089 firestore-import --backupFile db.json --yes

nojaf commented 1 year ago

@cuong0993 I just tried this and it worked like a charm. Thank you for this!