Search code examples
htmlcssfirebaseweb-hostingfirebase-hosting

I cannot choose the Firebase Directory in command line


I want to host a website via Firebase hosting. When i run firebase init on cmd i get this:

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 my_project.

How can i change my project? Since I've deleted the default project that firebase mentioned, when i run firebase deploy i got this error:

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

Can anyone show me the way out? Thanks.


Solution

  • The solution to this is very simple. All you have to do is go into your .firebaserc and change the defualt to the name of your project. You can probably also just delete .firebaserc and rerun firebase init.