Firebase初始化错误:“0”;HTTP错误:400,指定的项目ID无效;

Firebase初始化错误:“0”;HTTP错误:400,指定的项目ID无效;,firebase,firebase-realtime-database,firebase-cli,Firebase,Firebase Realtime Database,Firebase Cli,我正在尝试使用progressive app dev和firebase创建一个非常简单的聊天应用程序 我已经创建了Firebase项目,正在尝试在我的cmd中将其启动到我的应用程序的公用文件夹中。然而,它继续抛出错误400 C:\Users\mycomputer\Desktop\InstantChatApp\public>firebase init ######## #### ######## ######## ######## ### ###### ##

我正在尝试使用progressive app dev和firebase创建一个非常简单的聊天应用程序

我已经创建了Firebase项目,正在尝试在我的cmd中将其启动到我的应用程序的公用文件夹中。然而,它继续抛出错误400

 C:\Users\mycomputer\Desktop\InstantChatApp\public>firebase init

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  C:\Users\mycomputer

Before we get started, keep in mind:

  * You are initializing in an existing Firebase project directory

? Are you ready to proceed? Yes
? Which Firebase CLI features do you want to setup for this folder? Press Space to select features, then Enter to confi
rm your choices. Database: Deploy Firebase Realtime Database Rules, Firestore: Deploy rules and create indexes for Fire
store, Functions: Configure and deploy Cloud Functions, Hosting: Configure and deploy Firebase Hosting sites, Storage:
Deploy Cloud Storage security rules

=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.

i  .firebaserc already has a default project, skipping

=== Database Setup

Firebase Realtime Database Rules allow you to define how your data should be
structured and when your data can be read from and written to.

? What file should be used for Database Rules? database.rules.json
+  Database Rules for undefined have been downloaded to database.rules.json.
Future modifications to database.rules.json will update Database Rules when you run
firebase deploy.

=== Firestore Setup

Firestore Security Rules allow you to define how and when to allow
requests. You can keep these rules in your project directory
and publish them with firebase deploy.

? What file should be used for Firestore Rules? firestore.rules

Firestore indexes allow you to perform complex queries while
maintaining performance that scales with the size of the result
set. You can keep index definitions in your project directory
and publish them with firebase deploy.

? What file should be used for Firestore indexes? firestore.indexes.json

=== Functions Setup

A functions directory will be created in your project with a Node.js
package pre-configured. Functions can be deployed with firebase deploy.


Error: HTTP Error: 400, Invalid project ID specified.
我有一个index.html,头中有正确分配的项目链接,还有一个js,有正确的调用、函数和链接。
无论我怎么摆弄它,最终都会出现相同的错误:400。

Firebase CLI将在当前目录和所有父目录中查找名为
.firebaserc
的文件,该文件定义了此目录结构中使用的项目。如果运行
firebase init
并遇到消息“您正在现有firebase项目目录中初始化”,这意味着找到了其中一个
。firebaserc
文件,它将重新初始化现有项目

在您的特定情况下,CLI似乎遇到了一个
.firebaserc
文件,该文件包含的项目名称对于您运行
firebase登录时使用的帐户无效。可能是您删除了该项目,或者该项目与另一个帐户关联


听起来您可以发现
.firebaserc文件并将其删除,以便正确初始化项目。

Firebase CLI将在当前目录和所有父目录中查找名为
.firebaserc
的文件,该文件定义此目录结构中使用的项目。如果运行
firebase init
并遇到消息“您正在现有firebase项目目录中初始化”,这意味着找到了其中一个
。firebaserc
文件,它将重新初始化现有项目

在您的特定情况下,CLI似乎遇到了一个
.firebaserc
文件,该文件包含的项目名称对于您运行
firebase登录时使用的帐户无效。可能是您删除了该项目,或者该项目与另一个帐户关联


听起来您能够发现
.firebaserc文件并将其删除,以便正确初始化项目。

这可能是因为您正在现有的Firebase项目目录中进行初始化。尝试删除你的
.firebaserc
文件我看到有这样的文件,我已经删除了它们。太好了,非常感谢你的帮助!这可能是因为您正在现有Firebase项目目录中初始化。尝试删除你的
.firebaserc
文件我看到有这样的文件,我已经删除了它们。太好了,非常感谢你的帮助!