title: Google Cloud Function deployment failure
body: <p>I am new to Google Cloud Platform, and I am trying Google Cloud Functions but it is showing really strange behavior. I'm trying to run the following code:</p>
  
  <pre><code>exports.helloPubSub = (event, context) =&gt; {
   const pubsubMessage = event.data;  
   console.log(event.data.attributes);
   console.log(Buffer.from(pubsubMessage, 'base64').toString());
  };
  </code></pre>
  
  <p>But when I click to create a function, the deployment fails and hardly after trying 8-9 times it gets deployed. The error which it throws is</p>
  
  <pre><code>Deployment failure:
  Build failed: {"cacheStats": [{"status": "MISS", "hash": "0bb4aa23414dd82b8643cb2c86b5a55af031b22701fbe364a88ea6e61ad481a4", "type": "docker_layer_cache", "level": "global"}, {"status": "HIT", "hash": "0bb4aa23414dd82b8643cb2c86b5a55af031b22701fbe364a88ea6e61ad481a4", "type": "docker_layer_cache", "level": "project"}]}
  </code></pre>
  
  <p><strong>Is it a bug in Google Cloud Platform or am I doing something wrong?</strong> If I am doing something wrong, then I shouldn't be able to deploy it even once. </p>
  
  <p>Any help would really be appreciated. Thanks a lot!</p>