I am very new to Firebase and I have the following problem trying to deploy an Angular application on Firebase Storage.
I try to explain my situation in details.
I have two Google account. The first one contains a project and it is my DEV environment. Then I created a second account with a project (having the same name) that will be my PROD environment.
Some times ago I deployed my project on the first DEV environment and I had no problem.
Now I am experiencing some problem trying to deploy it on the second PROD environment.
First of all I performed:
firebase logout
in order to log out from the first DEV account. Then I perfromed:
firebase login
logging in with the mail related to my new PROD environment and I am logged in.
Then I have done
firebase init
and then I choosed this voice: Hosting: Configure and deploy Firebase Hosting sites in order to deploy my application on the hosting service of my PROD environment.
The problem is that selecting this voice I am obtaining this error message:
? Which Firebase CLI features do you want to set up for this folder? Press Space to select features, then Enter to confirm your choices. Hosting: C
onfigure and deploy Firebase Hosting sites
=== 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 color-patch.
Error: Failed to get Firebase project color-patch. Please make sure the project exists and your account has permission to access it.
Why am I obtaining this error message? What am I missing?
Inside my Firebase console of my PROD environment (where I am trying to deploy) into the project settings I have this:
Your project name is "color-patch-b808f", but the CLI thinks it's "color-patch". Perhaps you had originally created a project with a shorter name, then created a new project with the longer name - it's hard to tell. But you will have to reset the CLI's understanding of the project you want to use. It has saved the project name in a file called ".firebaserc" (which you can see from the CLI output). That file is at the root of your project where you initially ran firebase init
. You can either:
firebase init
againfirebase add
to add a new alias to this projectYou might want to review the documentation for the CLI to understand how to work with multiple projects.