title: Firebase deploy throws error "Hosting key and legacy hosting keys are both present in firebase.json."
body: <p><strong>When I run firebase deploy:</strong></p>
  
  <pre><code>    Camerons-MacBook-Pro-2:showboost cameronedwards$ firebase deploy
  ⚠  "firebase" key in firebase.json is deprecated. Run firebase use --add instead
  ⚠  hosting: We found a hosting key inside firebase.json as well as hosting configuration keys that are not nested inside the hosting key.
  
  
  Please run firebase tools:migrate to fix this issue.
  Please note that this will overwrite any configuration keys nested inside the hosting key with configuration keys at the root level of firebase.json.
  
  Error: Hosting key and legacy hosting keys are both present in firebase.json.
  </code></pre>
  
  <p><strong>When I run firebase use --add as suggested:</strong></p>
  
  <pre><code>    Camerons-MacBook-Pro-2:showboost cameronedwards$ firebase use --add
  ⚠  "firebase" key in firebase.json is deprecated. Run firebase use --add instead
  ? Which project do you want to add? showboost-e366b
  ? What alias do you want to use for this project? (e.g. staging) showboost
  
  Created alias showboost for showboost-e366b.
  Now using alias showboost (showboost-e366b)
  </code></pre>
  
  <p><strong>When I run firebase tools:migrate as suggested:</strong></p>
  
  <pre><code>Camerons-MacBook-Pro-2:showboost cameronedwards$ firebase tools:migrate
  ⚠  "firebase" key in firebase.json is deprecated. Run firebase use --add instead
  This command is deprecated and will be removed.
  i  Checking feature configuration...
  i  Checking "firebase" key...
  
  Error: Server Error. certificate has expired
  </code></pre>
  
  <p><strong>Finally, here's a look at my firebase.json file:</strong></p>
  
  <pre><code>    {
    "firebase": "showboost-e366b",
    "public": "showboost",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "rewrites": [
      {
        "source": "/public/**",
        "destination": "/public.html"
      },
      {
        "source": "**",
        "destination": "/index.html"
      }
    ],
    "database": {
      "rules": "database.rules.json"
    },
    "hosting": {
      "public": "public",
      "ignore": [
        "firebase.json",
        "**/.*",
        "**/node_modules/**"
      ],
      "rewrites": [
        {
          "source": "**",
          "destination": "/index.html"
        }
      ]
    }
  }
  </code></pre>
  
  <p><strong>I've been trying to fix this for a while so any help would be amazing, thank you!</strong></p>
  
  <p><strong>Edit - Ive been looking into it more and it looks like "firebase tools:migrate" is Depreciated. Is there a new command I need to use?</strong></p>