title: ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error:
body: <p>When I run <code>gcloud app deploy</code> I get error response 9. The error message I get is</p>
  
  <pre><code>Updating service [default] (this may take several minutes)...failed.                                                                                                                
  ERROR: (gcloud.app.deploy) Error Response: [9] 
  Application startup error:
  </code></pre>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>// Imports the Google Cloud client library
  const Datastore = require('@google-cloud/datastore');
  
  // Your Google Cloud Platform project ID
  const projectId = 'myid';
  
  // Creates a client
  const datastore = new Datastore({
      projectId: projectId,
  });
  
  // The kind for the new entity
  const kind = 'Task';
  // The name/ID for the new entity
  const name = 'sampletask1';
  // The Cloud Datastore key for the new entity
  const taskKey = datastore.key([kind, name]);
  
  // Prepares the new entity
  const task = {
      key: taskKey,
      data: {
          description: 'Buy milk',
      },
  };
  
  // Saves the entity
  datastore
      .save(task)
      .then(() =&gt; {
          console.log(`Saved ${task.key.name}: ${task.data.description}`);
      })
      .catch(err =&gt; {
          console.error('ERROR:', err);
      });
  </code></pre>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>{
    "name": "first-application",
    "version": "1.0.0",
    "description": "First program using cloud datastore",
    "main": "app.js",
    "scripts": {
      "start":"node app.js",
      "deploy":"gcloud app deploy",
      "test": "echo \"Error: no test specified\" &amp;&amp; exit 1"
    },
    "author": "Ragav",
    "license": "ISC",
    "dependencies": {
      "@google-cloud/datastore": "^1.4.1"
    }
  }
  </code></pre>
  
  <p><strong>app.yaml</strong></p>
  
  <pre><code>runtime: nodejs
  vm: true
  </code></pre>
  
  <p>Please help me, I am trying to learn deploying my app server on GCP. Appreciate your help.</p>
  
  <p>Thanks!</p>