1

I tried to deploy a very simple site for a Firebase project I have set up, and followed the following steps:

  1. firebase login (I was already logged in since I have other projects I'm working on)
  2. firebase init (created the .firebaserc and database.rules.json files).
  3. firebase deploy

On deploy, I keep getting the following error message:

λ firebase deploy

! Your CLI authentication needs to be updated to take advantage of new features.

! Please run firebase login --reauth

Error: Unable to authorize access to project [PROJECT NAME]

I succesfully ran firebase login --reauth and I still get this.

Anyone know what I could be doing wrong here?

KENdi
  • 7,576
  • 2
  • 16
  • 31
Jbbae
  • 824
  • 9
  • 19

2 Answers2

7

First warning shows you have to update firebase-cli.

Run this command to update:

npm install -g firebase-tools

Your project may not have been linked which causes that error.

Run this command to link the project:

firebase use --add

It will list down the projects in your firebase account, select the correct one and try deploying the project using:

firebase deploy

PS: You don't have to append project_id to deploy command every time once you run use --add command

1

Found my answer in another post

It seems that when deploying, you're supposed to deploy with:

firebase deploy --project [PROJECT ID, not PROJECT NAME]
Jbbae
  • 824
  • 9
  • 19