When I run firebase init
from my static project directory, project setup fails with this error:
Error: Failed to get Firebase project project-name. Please make sure the project exists and your account has permission to access it.
The project-name
in the error is different from the projectID
in the firebaseConfig
script. There is no project listed as project-name
in my firebase dashboard or project details.
I've tried logging out and logging in with --reauth and adding a project alias but the error is the same and so is the name difference. Leaving the login browser tab open definitely doesn't work.
It seems like something is going wrong with the project name. How do I sort this out?
The problem was an older version of my .firebaserc file. Once I deleted that the old firebase CLI project was fully deleted and I was able to run firebase init
successfully.