I ran firebase init in the wrong directory and it is connected to my project. To undo that, can I just delete ./firebase.json and my_newly_created_folder_name/ from the terminal? Thanks
Asked
Active
Viewed 3.6k times
31
-
7I had the same problem. Firebase CLI should add an option to remove/reset/ or re-initialize a project in a new folder. – mesqueeb Oct 18 '17 at 11:21
5 Answers
46
You should delete firebase.json
and .firebaserc
if it exists. Once those files are deleted you should be good to go.

Michael Bleigh
- 25,334
- 2
- 79
- 85
-
Thank you! worked for me to solve this problem: https://stackoverflow.com/questions/72104731/firebase-init-throws-error-failed-to-get-firebase-project-with-wrong-project-na/72116991#72116991 – WhooNo May 04 '22 at 17:15
3
I am using the following command
npm uninstall firebase
and
npm uninstall angularfire2
it works for me

Suraj Rao
- 29,388
- 11
- 94
- 103

Rafael Moura
- 1,247
- 2
- 14
- 26
0
As for Firebase CLI version 8.4.2, you should delete the folder "functions" as well as the following files: firebase.json, .firebaserc, .gitignore.

Adrian
- 415
- 4
- 18
0
If this is your case do not forget in /.github/workflows you may have CI (Deploy to Firebase Hosting on merge) configuration files firebase-hosting-merge.yml and firebase-hosting-pull-request.yml.

Konrad Grzyb
- 1,561
- 16
- 12