title: Angular 6 on App Engine - Error 500 on page refresh
body: <p>Angular 6 app on App Engine. Navigation on the app works fine but if I reload a page (whichever page) it displays the following error:</p>
  
  <pre><code>Error: Server Error
  </code></pre>
  
  <p>The server encountered an error and could not complete your request.
  Please try again in 30 seconds.</p>
  
  <p>It is working absolutely fine locally though. So I figured it might come from the app.yaml which is as follows:</p>
  
  <pre><code>runtime: nodejs10
  
  env_variables:
    environment: "--prod"
  
  handlers:
  - url: /assets
    static_dir: dist/assets
  - url: /
    secure: always
    static_files: dist/index.html
    upload: dist/.*
  - url: /(.*\.js)
    secure: always
    redirect_http_response_code: 301
    static_files: dist/\1
    upload: dist/.*\.js
  - url: /(.*\.css)
    secure: always
    redirect_http_response_code: 301
    static_files: dist/\1
    mime_type: text/css
    upload: dist/.*\.css
  </code></pre>
  
  <p>Error produced by App Engine:
  <code>"logMessage": "The request failed because the instance could not start successfully"</code></p>
  
  <p>Any idea what is happening and how to solve it?</p>