In my package.json I have the following dev script, that runs start:emulators. The script goes to the root of my project and then runs emulators:start, which sets the import path to ./saved-data.
"start:emulators": "cd ~/AndroidStudioProjects/order_fulfillment && firebase emulators:start --import=./saved-data --export-on-exit",
"dev": "concurrently --kill-others \"npm run start:emulators\" \"npm run ts:watch\"",
This work just fine, and my data always successfully imports and exports to the saved-data directory at the root of my project. However, this process also creates artifacts that I have to constantly delete from the root of my project. Anyone know why? It is more annoying than anything else. I just have to keep clearing them from time to time. They seem to have no bearing on exported data in the saved-data directory.

Firebase docs state "--export-on-exit= Optional...The export directory can be specified with this flag: firebase emulators:start --export-on-exit=./saved-data. If --import is used, the export path defaults to the same; for example: firebase emulators:start --import=./data-path --export-on-exit." I don't see anything in the docs about these artifact firebase-export... folders purpose at the root.
I've also had the problem of unwanted firebase-export... folders appearing in my project root. After switching from using concurrently to "npm-run-all" (https://www.npmjs.com/package/npm-run-all) for managing parallel tasks the problem disappeared. No other changes were made. Maybe this also helps others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With