Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

i .firebaserc already has a default project, using newproject-7432a. Error: Failed to get Firebase project newproject-7432a

I forgot to logout from Firebase account in Terminal and change account before proceeding with firebase init, and I created a Firebase function for the new project with an old account, I went back and deleted the files including xcworkspace, and I run pod install and created a new workspace, and when I want to run firebase init again it says

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.

Hence newproject-7432a is my old project with an old Firebase account, my new project is Doshirak

Is there anyway for me to solve this issue, or do I have to start from the beginning?

like image 262
HanKBeatz Avatar asked Dec 18 '19 08:12

HanKBeatz


3 Answers

This condition arises when we are initialising the project which has been already deployed on Firebase. While initialising the project in Firebase .firebaserc file is created which has the name of the Firebase Project where our application be deployed.

We can simply change the default the project name to the relative FirebaseBase Project name and redeploy after ngbuild.

so change go to .firebaserc file and change

  "projects": { "default": "your-previous-app" }

to

  "projects": { "default": "new-firebase-app" }
like image 43
C says CreativeCoder Avatar answered Oct 07 '22 04:10

C says CreativeCoder


Change your project directory from one drive to another drive. If project directory is in C drive then switch it to D drive and then initialize and deploy again on firebase. This problem will be resolved. It is the easiest method. If you are a beginner then it is the best solution for you otherwise locating .firebaserc file will be very difficult for you.

like image 44
wajahat12345 Avatar answered Oct 07 '22 05:10

wajahat12345


This message is telling you that the project directory where you're running firebase init has already been configured:

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

The file .firebaserc contains the ID of that project. If you don't want to use that project any more, just delete .firebaserc and run firebase init again.

like image 194
Doug Stevenson Avatar answered Oct 07 '22 05:10

Doug Stevenson