title: Error deploying Angular application on Firebase
body: <p>I tried deploying my <code>angular</code> 4 application on <code>firebase</code> but the setup did not ask me for any configuration as mentioned here: <a href="https://alligator.io/angular/deploying-angular-app-to-firebase/" rel="nofollow noreferrer">https://alligator.io/angular/deploying-angular-app-to-firebase/</a> and many <a href="https://stackoverflow.com/a/38274021/5346095">similar answers on stack</a>. Out of following 5 steps that firebase cli runs through on running <code>firebase init</code>, I was only asked for step1 and not for others.</p>
  
  <ol>
  <li>Firebase CLI features…: Hosting.</li>
  <li>Database rules file: You can keep that default file name that they
  provide, or change it if you prefer. This file will be created and
  will contain the database rules for your app.</li>
  <li>Public directory: Type in dist, because this is where your
  production-ready Angular app assets are.</li>
  <li>Configure as single-page app: Most of the time you’ll say yes (y)
  for this one. </li>
  <li>Overwrite index.html: No.</li>
  </ol>
  
  <p>Hence the <code>firebase.json</code> generated in root directory was empty:</p>
  
  <pre><code>{}
  </code></pre>
  
  <p>Then when I ran <code>firebase deploy</code>, I got this error:</p>
  
  <blockquote>
    <p>Error: Cannot understand what targets to deploy. Check that you
    specified valid targets if you used the --only or --except flag .
    Otherwise, check your firebase.json to ensure that your project is
    initialized for the desired features.</p>
  </blockquote>
  
  <p>I then googled for the <code>firebase.json</code> content that should have been created normally, then I pasted the below in json and deployed, it was successful:</p>
  
  <pre><code>{
    "hosting": {
      "public": "dist",
      "rewrites": [
        {
          "source": "**",
          "destination": "/index.html"
        }
      ]
    }
  }
  </code></pre>
  
  <p>Any reason why firebase didnot ask for configuration? Am I using the right content in firebase.json? I found "ignore" setup as well in this file <a href="https://github.com/AngularClass/angular-starter/blob/master/firebase.json" rel="nofollow noreferrer">here</a>. Can anyone share the correct content. TIA.</p>