Specify a target on Firebase deployment

In Firebase you can change the project that you are using at any given time by:

terminal
firebase use project_name

If you deploy and you get the following error: Hosting site or target project_name.web.app not detected in firebase.json, then take a look at the firebase.json config file.

It means that are targeting a site that is not detected in Firebase.

Example:

json
{
    "hosting": {
        "site": "another_project"
    }
}

You need to delete the default site or rename it to project_name.

Hi, I'm Erik, an engineer from Barcelona. If you like the post or have any comments, say hi.