Firebase CLI:firebase 项目:创建无法创建新项目

You*_*saf 2 firebase angular firebase-cli

使用并运行以下命令安装的firebase-tools版本:10.0.1npm

命令:

firebase projects:create
? Please specify a unique project id (warning: cannot be modified afterward) [6-30 characters]:
tour-of-heroes
? What would you like to call your project? (defaults to your project ID) Tour of Heroes
Run Code Online (Sandbox Code Playgroud)

错误:

Error: Failed to create project because there is already a project with ID tour-of-heroes. Please try again with a unique project ID.

我尝试使用不同的项目 ID 和名称进行相同的操作,但得到相同的错误。

Fra*_*len 7

错误消息告诉您出了什么问题:

已经有一个ID英雄游的项目了

项目 ID 在所有 Firebase 项目(或所有用户)中必须是全局唯一的,并且名为的项目tour-of-heroes已存在。

错误消息还告诉您该怎么做:

请使用唯一的项目 ID 重试。

建议使用控制台正是因为这将确保您的项目 ID 在所有 Firebase 项目中是唯一的。

如果您想使用 CLI,则可以使用唯一的项目 ID,例如添加唯一的后缀(例如tour-of-heroes-20220109yousafs-tour-of-heroes)。

  • 正确的是,项目 ID 在所有开发人员之间共享。当您的应用程序的用户连接到您的 Firebase 项目时,他们仅指定项目 ID,而不会指定任何可识别您(开发人员)身份的内容。所以它必须是全局唯一的查找。 (2认同)