如何使用VSCode从Firestore导出数据

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

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 :


npm cache clean --force```

Then I run `firebase --version`, which is really up to date.

<details>
<summary>英文:</summary>

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.

&gt; Error: firestore:export is not a Firebase command

To fix the error I uninstall the :

npm uninstall -g firebase-tools

npm cache clean --force


Then I run
`firebase --version`, which is really up to date.


</details>


# 答案1
**得分**: 0

你混淆了两个不同的命令行工具:

* 来自Google云平台的`gcloud`
* 来自Firebase的`firebase`

`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)。

<details>
<summary>英文:</summary>

You&#39;re confusing two separate command line tools:

* `gcloud` from the Google Cloud Platform
* `firebase` from Firebase

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).

</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:

确定