title: How do I deploy my Typescript Node.js app to Heroku?
body: <p>When testing locally I was previously running:</p>
  
  <pre><code>"build-live": "nodemon --exec ./node_modules/.bin/ts-node -r dotenv/config -- ./index.ts"
  </code></pre>
  
  <p>I then figured my Procfile should be something like:</p>
  
  <pre><code>web: ./node_modules/.bin/ts-node -- ./index.ts
  </code></pre>
  
  <p>But it says module 'typescript' not found, even when it is in <code>package.json</code>. I read in a few places that <code>ts-node</code> is not the way to go to deploy to Heroku, so I am not sure what to do.</p>
  
  <p>UPDATE: I think I am supposed to compile it, so I tried:</p>
  
  <pre><code>web: ./node_modules/.bin/tsc --module commonjs --allowJs --outDir build/ --sourceMap --target es6 index.ts &amp;&amp; node build/index.js
  </code></pre>
  
  <p>This succeeds, however when actually running it, a bunch of the libs I'm using get "Cannot find module '...'".</p>