I have recently had an issue with my firebase account where any new projects don't show in the CLI when I run firebase init
. I deleted a project I didn't need, and that updated immediately, any help is greatly appreciated!
Use npm (the Node Package Manager) to install the CLI and enable the globally available firebase command.
Firebase CLI. The Firebase Command Line Interface (CLI) Tools can be used to test, manage, and deploy your Firebase project from the command line. Deploy code and assets to your Firebase projects. Run a local web server for your Firebase Hosting site.
Run firebase tools --version to check version. And as per the prompt, run npm install -g firebase-tools to update.
There is a simpler solution, first, determine your projectId
from the Firebase Console. Firebase usually adds a random number to your project's name i.e if you are using demo
as the project name the projectId will look like demo-1234
Next, in your terminal, cd
into your project's target directory and issue the followoing command
firebase -P <projectId> init
assuming demo-1234
was my projectId, I will issue the command as below
firebase -P demo-1234 init
Use firebase use --add projectId
, this will add your project
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With