Installed firebase-tools version 10.0.1 using npm and run the following command:
Command:
firebase projects:create
? Please specify a unique project id (warning: cannot be modified afterward) [6-30 characters]:
tour-of-heroes
? What would you like to call your project? (defaults to your project ID) Tour of Heroes
Error:
Error: Failed to create project because there is already a project with ID tour-of-heroes. Please try again with a unique project ID.
I tried the same with different project ID and names but getting same error.
CodePudding user response:
If you cannot start a new project this way I would suggest to create a project directly from Firebase console at this link: https://firebase.google.com/?gclsrc=ds&gclsrc=ds&gclid=CJOyiZ-0pPUCFUZCHQkdxlMPRA
Then go in a folder where you want your project and type the command:
firebase init
Then follow the instructions and select "Use an existing project"
CodePudding user response:
The error message tells you what is wrong:
there is already a project with ID tour-of-heroes
Project IDs have to be globally unique within all Firebase projectsm and a project named tour-of-heroes already exists.
The error message also tells you what to do:
Please try again with a unique project ID.
The suggestion to use the console is precisely because that will ensure your project ID is unique amongst all Firebase projects.
If you want to use the CLI, it is up to you to use a unique project ID - for example by adding a unique suffix (e.g. tour-of-heroes-20220109 or yousafs-tour-of-heroes).
