title: Errors deploying node elastic beanstalk application
body: <p>When deploying my new elastic beanstalk, <code>Node.js 12 running on 64bit Amazon Linux 2/5.2.2</code>, application, I'm getting error after running <code>$ eb deploy myapp-staging-env</code>:</p>
  <pre><code>2020-10-17 19:57:56    INFO    Environment update is starting.      
  2020-10-17 19:58:22    INFO    Deploying new version to instance(s).
  2020-10-17 19:58:49    ERROR   Instance deployment failed. For details, see 'eb-engine.log'.
  2020-10-17 19:58:49    ERROR   [Instance: i-034b2f1000000] Command failed on instance. Return code: 1 Output: Engine execution has encountered an error..
  2020-10-17 19:58:49    INFO    Command execution completed on all instances. Summary: [Successful: 0, Failed: 1].
  2020-10-17 19:58:49    ERROR   Unsuccessful command execution on instance id(s) 'i-034b2f1d46f466259'. Aborting the operation.
  2020-10-17 19:58:50    ERROR   Failed to deploy application.  
  </code></pre>
  <p>I don't really know where to start.</p>
  <p><strong>Errors from logs:</strong></p>
  <p><em>Web.stdout.log:</em> where do I go to fix this error?</p>
  <pre><code>----------------------------------------
  /var/log/web.stdout.log
  ----------------------------------------
  Oct 17 17:31:43 ip-172-31-47-6 web: Server running at http://127.0.0.1:8080/
  ...
  Oct 17 19:58:50 ip-172-31-47-6 web: /bin/sh: -c: line 0: syntax error near unexpected token `('
  Oct 17 19:58:50 ip-172-31-47-6 web: /bin/sh: -c: line 0: `node app.js%!(EXTRA string=server.js)'
  </code></pre>
  <p><em>Engine execution has encountered an error:</em> what does this mean?</p>
  <pre><code>2020/10/17 19:58:49.360716 [INFO] Executing cleanup logic
  2020/10/17 19:58:49.360804 [INFO] CommandService Response: {&quot;status&quot;:&quot;FAILURE&quot;,&quot;api_version&quot;:&quot;1.0&quot;,&quot;results&quot;:[{&quot;status&quot;:&quot;FAILURE&quot;,&quot;msg&quot;:&quot;Engine execution has encountered an error.&quot;,&quot;returncode&quot;:1,&quot;events&quot;:[{&quot;msg&quot;:&quot;Instance deployment failed. For details, see 'eb-engine.log'.&quot;,&quot;timestamp&quot;:1602964729,&quot;severity&quot;:&quot;ERROR&quot;}]}]}
  2020/10/17 19:58:49.360984 [INFO] Platform Engine finished execution on command: app-deploy
  </code></pre>
  <p><em>Execution error on command <code>[app-deploy]</code>:</em> where do I go to fix this?</p>
  <pre><code>2020/10/17 19:58:49.339070 [INFO] Running command /bin/sh -c systemctl start web.service
  2020/10/17 19:58:49.360702 [ERROR] An error occurred during execution of command [app-deploy] - [FlipApplication]. Stop running the command. Error: Register application failed because the registration of proc web failed: 
  startProcess Failure: starting process &quot;web&quot; failed: Command /bin/sh -c systemctl start web.service failed with error exit status 1. Stderr:Job for web.service failed because the control process exited with error code. See &quot;systemctl status web.service&quot; and &quot;journalctl -xe&quot; for details.
  </code></pre>
  <p><strong>My package.json:</strong></p>
  <pre><code>{
      &quot;name&quot;: &quot;api&quot;,
      &quot;version&quot;: &quot;0.0.0&quot;,
      &quot;private&quot;: true,
      &quot;engines&quot;: {
          &quot;node&quot; : &quot;12.18.0&quot;
      },
      &quot;scripts&quot;: {
          &quot;initialize&quot;: &quot;knex migrate:latest &amp;&amp; knex seed:run&quot;,
          &quot;reset&quot;: &quot;node_modules/.bin/knex migrate:rollback &amp;&amp; node_modules/.bin/knex migrate:latest &amp;&amp; node_modules/.bin/knex seed:run&quot;,
          &quot;initialize-prod&quot;: &quot;node_modules/.bin/knex migrate:latest --env production &amp;&amp; node_modules/.bin/knex seed:run --env production&quot;,
          &quot;reset-prod&quot;: &quot;node_modules/.bin/knex migrate:rollback --env production &amp;&amp; node_modules/.bin/knex migrate:latest --env production &amp;&amp; node_modules/.bin/knex seed:run --env production&quot;,
          &quot;start&quot;: &quot;node -v &amp;&amp; node server.js&quot;,
          &quot;server&quot;: &quot;node -v &amp;&amp; nodemon server.js&quot;,
          &quot;server-debug&quot;: &quot;nodemon --inspect=0.0.0.0 server.js&quot;,
          &quot;test&quot;: &quot;mocha&quot;
      },
      &quot;dependencies&quot;: {
          &quot;@google-cloud/speech&quot;: &quot;^3.5.4&quot;,
          &quot;@google-cloud/translate&quot;: &quot;^5.1.4&quot;,
          &quot;body-parser&quot;: &quot;^1.18.3&quot;,
          &quot;bookshelf&quot;: &quot;^0.13.3&quot;,
          &quot;cookie-parser&quot;: &quot;~1.4.3&quot;,
          &quot;cors&quot;: &quot;^2.8.4&quot;,
          &quot;debug&quot;: &quot;~2.6.9&quot;,
          &quot;dotenv&quot;: &quot;^7.0.0&quot;,
          &quot;ejs&quot;: &quot;~2.5.7&quot;,
          &quot;event-stream&quot;: &quot;^3.3.5&quot;,
          &quot;express&quot;: &quot;~4.16.0&quot;,
          &quot;fs&quot;: &quot;0.0.1-security&quot;,
          &quot;fs-path&quot;: &quot;0.0.24&quot;,
          &quot;knex&quot;: &quot;^0.20.8&quot;,
          &quot;lodash&quot;: &quot;^4.17.15&quot;,
          &quot;mailgun-js&quot;: &quot;^0.22.0&quot;,
          &quot;moment&quot;: &quot;^2.22.2&quot;,
          &quot;morgan&quot;: &quot;^1.9.1&quot;,
          &quot;nock&quot;: &quot;^10.0.6&quot;,
          &quot;node-gyp&quot;: &quot;^7.1.2&quot;,
          &quot;passport&quot;: &quot;^0.4.0&quot;,
          &quot;passport-cookie&quot;: &quot;^1.0.6&quot;,
          &quot;pg&quot;: &quot;^7.5.0&quot;,
          &quot;request&quot;: &quot;^2.88.0&quot;,
          &quot;request-promise&quot;: &quot;^4.2.2&quot;,
          &quot;swagger-jsdoc&quot;: &quot;^4.0.0&quot;,
          &quot;swagger-ui-express&quot;: &quot;^4.1.4&quot;
      },
      &quot;devDependencies&quot;: {
          &quot;chai&quot;: &quot;^4.2.0&quot;,
          &quot;mocha&quot;: &quot;^6.2.0&quot;,
          &quot;nodemon&quot;: &quot;^1.18.4&quot;
      }
  }
  </code></pre>
  <hr />
  <p>Also, for a previous node app I launched (last year), I was able to modify <code>gzip compression</code> and specify the node command, but this option is no longer available:</p>
  <p><a href="https://i.stack.imgur.com/mpgx8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mpgx8.png" alt="enter image description here" /></a></p>