title: Firebase cannot understand what targets to deploy
body: <p>When deploying the following hello-world equivalent code I get the error shown in the end:-</p>
  
  <pre><code>$ ls -lR
  .:
  total 8
  -rw-r--r-- 1 hgarg hgarg    3 Aug 29 14:55 firebase.json
  drwxr-xr-x 2 hgarg hgarg 4096 Aug 29 11:56 functions
  
  ./functions:
  total 4
  -rw-r--r-- 1 hgarg hgarg 1678 Aug 29 11:56 index.js
  </code></pre>
  
  <p>firebase.json looks like this:-</p>
  
  <pre><code>{}
  </code></pre>
  
  <p>and index.json like this:-</p>
  
  <pre><code>'use strict';
  
  const functions = require('firebase-functions');
  
  exports.search = functions.https.onRequest((req, res) =&gt; {
    if (req.method === 'PUT') {
      res.status(403).send('Forbidden!');
    }
  
    var category = 'Category';
    console.log('Sending category', category);
    res.status(200).send(category);
  });
  </code></pre>
  
  <p>But deploying fails:-</p>
  
  <pre><code>$ firebase deploy
  
  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.
  
  $ firebase deploy --only functions
  
  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.
  </code></pre>