title: Error when deploying Angular Universal app on Google Cloud App Engine
body: <p>When I run gcloud app deploy in Cloud Shell in my browser, I get an Error - Cannot find module '/srv/server.js' over and over. I also get a 500 server error when I view my app URL.</p>
  
  <p>I have a basic Angular app with one lazy loaded path/component just for testing. I installed Angular Universal and then I built my app locally using the commands <code>ng build --prod &amp;&amp; npm run build:ssr</code> which put the following files in the dist folder:</p>
  
  <pre><code>- browser
      - all the usual Angular files like index.html etc etc
  - server
      - main.js
  - app.yaml
  - package.json
  - prerender.js
  - server.js
  </code></pre>
  
  <p>I have created a basic app on Google App Engine and logged into my app by clicking the Cloud Shell button in my App Engine console.</p>
  
  <p>I then clicked the editor button where you can browse files and write commands in your browser window.</p>
  
  <p>Inside my app.yaml file I have:</p>
  
  <pre><code>runtime: nodejs10
  </code></pre>
  
  <p>In my package.json file I have:</p>
  
  <pre><code>{
      "scripts": {
          "start": "node server.js"
      }
  }
  </code></pre>
  
  <p>So in Cloud Shell I go to the root directory is where all my files are and where my app.yaml file is and then I run <code>gcloud app deploy</code>.</p>
  
  <p>It then uploads my files to the storage bucket and then runs the node server.js script. Nothing happens in the cloud shell console but when I look in the error log <code>gcloud app logs tail -s default</code> and I go to my app URL, it shows a 500 Server Error and logs Error: Cannot find module '/srv/server.js' over and over.</p>
  
  <pre><code>internal/modules/cjs/loader.js:638
  Error: Cannot find module '/srv/server.js' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)      at Function.Module._load (internal/modules/cjs/loader.js:562:25) at Function.Module.runMain (internal/modules/cjs/loader.js:831:12) at startup (internal/bootstrap/node.js:283:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>Thank you!</p>
  
  <p>I expect to see my Angular app running on the App Engine Cloud URL.</p>