title: How to Deploy Angular 7 Project to Google Cloud
body: <p>I have built an Angular 7 application that works nicely when I do the <code>ng serve</code> command from my local mac or from a remote centos server.</p>
  
  <p>This application is using <code>php</code> files that access MySQL data base both served on my google cloud.</p>
  
  <p>Now after doing the <code>gcloud app deploy</code> the last thing I see on the screen is the message:</p>
  
  <blockquote>
    <p>nebula@0.0.0 start /app
    ng serve</p>
    
    <p>sh: 1: ng: not found</p>
  </blockquote>
  
  <p>and I am dead in the water.</p>
  
  <p>I have tried so many different versions of <code>app.yaml</code> and <code>cloudbuild.yaml</code> file that I feel like i have not learned anything.</p>
  
  <p>I have tried the same thing by starting with the very basic "Hero's" app and get the same issue.</p>
  
  <p>i.e.</p>
  
  <blockquote>
    <p>ng new xxx
    cd xxx
    npm install
    ng serve</p>
  </blockquote>
  
  <p>Then I see the default Heros screen in my browser.</p>
  
  <p>I then create this <code>app.yaml</code> file</p>
  
  <pre><code>runtime: nodejs
  env: flex
  
  manual_scaling:
    instances: 1
  resources:
    cpu: 1
    memory_gb: 0.5
    disk_size_gb: 10
  
  
  service: 
    xxx
  </code></pre>
  
  <p>I then try to deploy using:</p>
  
  <blockquote>
    <p>gcloud app deploy</p>
  </blockquote>
  
  <p>When this finishes I get the message</p>
  
  <blockquote>
    <p>Deployed service [xxx] to [<a href="https://xxx-dot-project.appspot.com]" rel="nofollow noreferrer">https://xxx-dot-project.appspot.com]</a></p>
  </blockquote>
  
  <p>When I go to that url, I get:</p>
  
  <blockquote>
    <p>Error: Server Error</p>
  </blockquote>
  
  <p>The server encountered an error and could not complete your request.
  Please try again in 30 seconds.</p>
  
  <p>The log file for this run is:</p>
  
  <pre><code>    gcloud app logs tail -s xxx
      Waiting for new log entries...
      2019-05-04 15:27:35 xxx[20190504t102436]  "GET / HTTP/1.1" 404
      2019-05-04 15:27:35 xxx[20190504t102436]  "GET /favicon.ico HTTP/1.1" 404
      2019-05-04 15:28:56 xxx[20190504t102436]  "GET / HTTP/1.1" 404
      2019-05-04 15:32:45 xxx[prod]  "GET / HTTP/1.1" 404
      2019-05-04 15:32:50 xxx[prod]  "GET / HTTP/1.1" 404
      2019-05-04 15:33:06 xxx[prod]  "GET / HTTP/1.1" 404
      2019-05-04 15:33:10 xxx[prod]  "GET /run HTTP/1.1" 404
      2019-05-04 15:33:10 xxx[prod]  "GET /favicon.ico HTTP/1.1" 404
      2019-05-04 15:33:16 xxx[prod]  "GET /run HTTP/1.1" 404
      2019-05-04 15:33:16 xxx[prod]  "GET / HTTP/1.1" 404
      2019-05-04 15:33:19 xxx[prod]  "GET /login HTTP/1.1" 404
      2019-05-04 15:33:19 xxx[prod]  "GET /favicon.ico HTTP/1.1" 404
      2019-05-04 15:40:43 xxx[prod]  "GET /login HTTP/1.1" 404
      2019-05-04 15:40:46 xxx[prod]  "GET /login HTTP/1.1" 404
      2019-05-04 15:40:50 xxx[prod]  "GET /login HTTP/1.1" 404
      2019-05-04 15:40:50 xxx[prod]  "GET / HTTP/1.1" 404
      2019-05-04 15:40:53 xxx[prod]  "GET / HTTP/1.1" 404
      2019-05-04 16:01:50 xxx[20190504t105955]  "GET / HTTP/1.1" 500
      2019-05-04 16:01:51 xxx[20190504t105955]  /bin/sh: 1: ng: not found
      2019-05-04 16:06:19 xxx[20190504t105955]  "GET / HTTP/1.1" 500
      2019-05-04 16:06:20 xxx[20190504t105955]  /bin/sh: 1: ng: not found
  </code></pre>
  
  <p>My question is can someone provide a trivial example of this process where the application runs in the google cloud?</p>