如何使用VSCode从Firestore导出数据

huangapple go评论80阅读模式
英文:

How to export data from firestore using vscode

问题

以下是翻译好的部分:

I want to export data from firestore.

I tried running the following code.

firebase firestore:export data.json

Tried multiple things and still can get an output file with the data in my database.

> Error: firestore:export is not a Firebase command

To fix the error I uninstall the :

  1. npm cache clean --force```
  2. Then I run `firebase --version`, which is really up to date.
  3. <details>
  4. <summary>英文:</summary>
  5. I want to export data from firestore.
  6. I tried running the following code.

firebase firestore:export data.json

  1. Tried multiple things and still can get an output file with the data in my database.
  2. &gt; Error: firestore:export is not a Firebase command
  3. To fix the error I uninstall the :

npm uninstall -g firebase-tools

npm cache clean --force

  1. Then I run
  2. `firebase --version`, which is really up to date.
  3. </details>
  4. # 答案1
  5. **得分**: 0
  6. 你混淆了两个不同的命令行工具:
  7. * 来自Google云平台的`gcloud`
  8. * 来自Firebase`firebase`
  9. `firestore export` 命令只存在于`gcloud` CLI 中,并在[这里](https://cloud.google.com/sdk/gcloud/reference/firestore/export) 和[这里](https://cloud.google.com/firestore/docs/manage-data/export-import#gcloud)有文档。在Firebase CLI 中没有等效的命令,有关选项的文档在[这里](https://firebase.google.com/docs/cli)。
  10. <details>
  11. <summary>英文:</summary>
  12. You&#39;re confusing two separate command line tools:
  13. * `gcloud` from the Google Cloud Platform
  14. * `firebase` from Firebase
  15. The `firestore export` command is only present in the `gcloud` CLI, and documented [here](https://cloud.google.com/sdk/gcloud/reference/firestore/export) and [here](https://cloud.google.com/firestore/docs/manage-data/export-import#gcloud). There is no equivalent command in the Firebase CLI, for which the options are documented [here](https://firebase.google.com/docs/cli).
  16. </details>

huangapple
  • 本文由 发表于 2023年2月19日 13:26:25
  • 转载请务必保留本文链接:https://go.coder-hub.com/75498181.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定