Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New project not showing on firebase CLI

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!

like image 325
Max S. Avatar asked Nov 18 '18 23:11

Max S.


People also ask

Which command is used to setup firebase hosting in local project using CLI?

Use npm (the Node Package Manager) to install the CLI and enable the globally available firebase command.

What is the firebase CLI npm module?

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.

How do you check firebase CLI is installed?

Run firebase tools --version to check version. And as per the prompt, run npm install -g firebase-tools to update.


2 Answers

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

like image 196
Geofrey Ssekirime Avatar answered Sep 19 '22 16:09

Geofrey Ssekirime


Use firebase use --add projectId, this will add your project

like image 32
Dragon Avatar answered Sep 21 '22 16:09

Dragon