title: Typescript package.json scripts run build and start concurrently: port already in use
body: <p>I am having an interesting problem building my typescript server using nodemon.  I have a script for building out the ts files, and then starting the server.  However, when I run these two concurrently, it starts at first fine, then after it is done building, it restarts, but gives me an error that the port is already in use.  Is there a way to somehow kill the port each time before it starts?</p>
  <pre><code>&quot;scripts&quot;: {
      &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
      &quot;start:dev&quot;: &quot;nodemon dist/index.js&quot;,
      &quot;build:dev&quot;: &quot;tsc --watch --preserveWatchOutput&quot;,
      &quot;dev&quot;: &quot;concurrently  \&quot;npm:build:dev\&quot;  \&quot;npm:start:dev\&quot;&quot;
    },
  </code></pre>
  <p>I have tried adding &quot;npx kill-port 8080 &amp;&amp; nodemon dist/index.js&quot; to the start:dev, but I am still getting that error.  I have also tried &quot;npx kill-port 8080; nodemon dist/index.js&quot;   Is there a solution to this issue?  Thanks.</p>
  <p>Edit: It seems that this is actually working as I expected it too however, for some reason the terminal is still showing an error message and therefore, anything my server logs to the console is hidden.  Is there any way to fix this?  Thanks.</p>