首页 > 解决方案 > 我 .firebaserc 已经有一个默认项目,使用 newproject-7432a。错误:无法获取 Firebase 项目 newproject-7432a

问题描述

在继续之前,我忘记从终端中的 Firebase 帐户注销并更改帐户firebase init,我用旧帐户为新项目创建了一个 Firebase 功能,我回去删除了包括 xcworkspace 在内的文件,然后运行 ​​pod install 并创建了一个新的工作区,当我想firebase init再次运行时,它说

MooMyeongs-MacBook-Pro:Doshirak moomyeong$ firebase init

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

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

  /Users/moomyeong/Desktop/Desktop/Applications/Doshirak

? Which Firebase CLI features do you want to set up for this folder? Press Space
 to select features, then Enter to confirm your choices. Firestore: Deploy rules
 and create indexes for Firestore, Functions: Configure and deploy Cloud Functio
ns

=== 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, using newproject-7432a.

Error: Failed to get Firebase project newproject-7432a. Please make sure the project exists and your account has permission to access it.

因此newproject-7432a是我使用旧 Firebase 帐户的旧项目,我的新项目是 Doshirak

无论如何我可以解决这个问题,还是我必须从头开始?

标签: firebasefirebase-cli

解决方案


此消息告诉您运行 firebase init 的项目目录已经配置:

i  .firebaserc already has a default project, using newproject-7432a.

.firebaserc 文件包含该项目的 ID。如果您不想再使用该项目,只需删除 .firebaserc 并再次运行 firebase init。


推荐阅读