title: Cloud Firestore emulator not running when testing Cloud Functions locally
body: <p>I've been trying to implement some Cloud Functions that reads data from Cloud Firestore. I want to test these locally, however I cannot get the Cloud Firestore emulator to run. My assumptions are that it's where the problem is, but it might be somewhere else - if that's the case please let me know.</p>
  
  <p>Here is my function:</p>
  
  <pre><code>import * as functions from 'firebase-functions';
  import * as admin from 'firebase-admin'
  
  admin.initializeApp()
  
  //Functions to fetch the documents in the user collection and send them to the client.
  export const getUserDocs = functions.https.onRequest((request, response) =&gt; {
      admin.firestore().doc('/Users/{documentId}').get()
      .then(snapshot =&gt; {
          const data = snapshot.data()
          response.send(data)
      })
      .catch(error =&gt; {
          response.status(500).send(error)
      })
  })
  
  </code></pre>
  
  <p>This is the error I get when I run the command <code>firebase serve --only functions</code> :</p>
  
  <pre><code>Carlo@Carlos-Air-2 functions % firebase serve --only functions
  ⚠  Your requested "node" version "8" doesn't match your global version "13"
  ✔  functions: functions emulator started at http://localhost:5000
  i  functions: Watching "/Users/Carlo/app/functions" for Cloud Functions...
  ✔  functions[getUserSports]: http function initialized (http://localhost:5000/app/us-central1/getUserSports).
  i  functions: Beginning execution of "getUserSports"
  ⚠  functions: The Cloud Firestore emulator is not running, so calls to Firestore will affect production.
  ⚠  External network resource requested!
     - URL: "http://179.252.163.233/computeMetadata/v1/instance"
   - Be careful, this may be a production service.
  ⚠  External network resource requested!
     - URL: "http://metadata.google.internal./computeMetadata/v1/instance"
   - Be careful, this may be a production service.
  i  functions: Finished "getUserSports" in ~9s
  </code></pre>
  
  <p>I've tried starting from scratch again and uninstalling and reinstalling but with no success.
  I've also watched the tutorial series on YouTube but for some reason my code doesn't work.</p>
  
  <p>Any help is greatly appreciated.</p>