sanketkheni01 / fire-import

14 stars 3 forks source link

Project-id not found, not asked for #6

Open j1mmie opened 1 year ago

j1mmie commented 1 year ago

I have a .firebaserc file that looks like this:

{
  "projects": {
    "prod": "my-production-project-id"
  },
  "targets": {},
  "etags": {}
}

Since the file exists, but no default project is specified, fire-import fails with the following error:

Error: Command failed: gcloud firestore export gs://undefined.appspot.com/firestore_export/
ERROR: (gcloud.firestore.export) PERMISSION_DENIED: Permission denied: Consumer 'project:undefined' has been suspended.

It would be convenient to allow the user to specify a project name instead of default. For example:

npx fire-import firestore --project-name prod

My reason for not keeping a default project in my .firebaserc is so that I don't accidentally delete, push, or overwrite production data.

sanketkheni01 commented 1 year ago

Thanks again for letting me know the requirement I wasn't aware of the custom project id use. I will try to provide arg in next update.