title: Google Scheduled functions: There was an error deploying functions?
body: <p>I have a fresh project but was looking to test scheduled functions. Am I missing anything?</p>
  <pre><code>$ firebase deploy
  
  === Deploying to 'testing-db'...
  
  i  deploying functions
  i  functions: ensuring required API cloudfunctions.googleapis.com is enabled...
  i  functions: ensuring required API cloudbuild.googleapis.com is enabled...
  !  functions: missing required API cloudbuild.googleapis.com. Enabling now...
  +  functions: required API cloudfunctions.googleapis.com is enabled
  +  functions: required API cloudbuild.googleapis.com is enabled
  i  functions: preparing functions directory for uploading...
  i  functions: packaged functions (24.45 KB) for uploading
  i  functions: ensuring required API pubsub.googleapis.com is enabled...
  i  functions: ensuring required API cloudscheduler.googleapis.com is enabled...
  !  functions: missing required API cloudscheduler.googleapis.com. Enabling now...
  +  functions: required API pubsub.googleapis.com is enabled
  +  functions: required API cloudscheduler.googleapis.com is enabled
  +  functions: functions folder uploaded successfully
  i  functions: creating Node.js 14 function scheduledFunction(us-central1)...
  
  Functions deploy had errors with the following functions:
          scheduledFunction(us-central1)
  i  functions: cleaning up build files...
  
  Error: There was an error deploying functions
  </code></pre>
  <p><strong>Index.js</strong></p>
  <pre><code>const functions = require('firebase-functions');
  
  exports.scheduledFunction = functions.pubsub
    .schedule('every 1 minutes')
    .onRun((context) =&gt; {
      
      return console.log('This will be run every 1 minutes!');
    });
  </code></pre>
  <p>Firebase log shows:</p>
  <pre><code>Error: Failed to upsert schedule function scheduledFunction in region europe-west1
  </code></pre>