title: Can't run my Node.js Typescript project TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts" for /app/src/App.ts
body: <p>When I try to start my app on Heroku I got the following stack trace.
  It is just a basic ts.app like you see with ts-node and nodemon.</p>
  <p>I am really interested in what the answer is going to be.</p>
  <pre><code>2020-05-30T00:03:12.201106+00:00 heroku[web.1]: Starting process with command `npm start`
  2020-05-30T00:03:14.405285+00:00 app[web.1]: 
  2020-05-30T00:03:14.405303+00:00 app[web.1]: &gt; discordtoornamentmanager@1.0.0 start /app
  2020-05-30T00:03:14.405303+00:00 app[web.1]: &gt; ts-node src/App.ts
  2020-05-30T00:03:14.405304+00:00 app[web.1]: 
  2020-05-30T00:03:14.833655+00:00 app[web.1]: (node:23) ExperimentalWarning: The ESM module loader is experimental.
  2020-05-30T00:03:14.839311+00:00 app[web.1]: TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension &quot;.ts&quot; for /app/src/App.ts
  2020-05-30T00:03:14.839312+00:00 app[web.1]:     at Loader.defaultGetFormat [as _getFormat] (internal/modules/esm/get_format.js:65:15)
  2020-05-30T00:03:14.839314+00:00 app[web.1]:     at Loader.getFormat (internal/modules/esm/loader.js:113:42)
  2020-05-30T00:03:14.839315+00:00 app[web.1]:     at Loader.getModuleJob (internal/modules/esm/loader.js:244:31)
  2020-05-30T00:03:14.839315+00:00 app[web.1]:     at processTicksAndRejections (internal/process/task_queues.js:97:5)
  2020-05-30T00:03:14.839316+00:00 app[web.1]:     at Loader.import (internal/modules/esm/loader.js:178:17)
  2020-05-30T00:03:14.847801+00:00 app[web.1]: npm ERR! code ELIFECYCLE
  2020-05-30T00:03:14.847998+00:00 app[web.1]: npm ERR! errno 1
  2020-05-30T00:03:14.848957+00:00 app[web.1]: npm ERR! discordtoornamentmanager@1.0.0 start: `ts-node src/App.ts`
  2020-05-30T00:03:14.849050+00:00 app[web.1]: npm ERR! Exit status 1
  2020-05-30T00:03:14.849172+00:00 app[web.1]: npm ERR! 
  2020-05-30T00:03:14.849254+00:00 app[web.1]: npm ERR! Failed at the discordtoornamentmanager@1.0.0 start script.
  2020-05-30T00:03:14.849337+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  2020-05-30T00:03:14.854859+00:00 app[web.1]: 
  2020-05-30T00:03:14.854998+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
  2020-05-30T00:03:14.855069+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-05-30T00_03_14_850Z-debug.log
  2020-05-30T00:03:14.907689+00:00 heroku[web.1]: Process exited with status 1
  2020-05-30T00:03:14.943718+00:00 heroku[web.1]: State changed from starting to crashed
  </code></pre>
  <p>This is my package.json</p>
  <pre><code>{
     &quot;name&quot;: &quot;discordtoornamentmanager&quot;,
     &quot;version&quot;: &quot;1.0.0&quot;,
     &quot;description&quot;: &quot;&quot;,
     &quot;main&quot;: &quot;dist/app.js&quot;,
     &quot;type&quot;: &quot;module&quot;,
     &quot;scripts&quot;: {
        &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
        &quot;dev&quot;: &quot;nodemon -x ts-node src/App.ts&quot;,
        &quot;start&quot;: &quot;ts-node src/App.ts&quot;
     },
     &quot;keywords&quot;: [],
     &quot;author&quot;: &quot;&quot;,
     &quot;license&quot;: &quot;ISC&quot;,
     &quot;dependencies&quot;: {
        &quot;@types/node&quot;: &quot;^14.0.5&quot;,
        &quot;axios&quot;: &quot;^0.19.2&quot;,
        &quot;discord.js&quot;: &quot;^12.2.0&quot;,
        &quot;pg&quot;: &quot;^8.2.1&quot;,
        &quot;reflect-metadata&quot;: &quot;^0.1.10&quot;,
        &quot;typeorm&quot;: &quot;0.2.25&quot;,
        &quot;typescript&quot;: &quot;^3.9.3&quot;,
        &quot;nodemon&quot;: &quot;^2.0.4&quot;,
        &quot;ts-node&quot;: &quot;8.10.1&quot;
  
     }
  }
  </code></pre>
  <p>And this is my tsconfig</p>
  <pre><code>{
     &quot;compilerOptions&quot;: {
        &quot;lib&quot;: [
           &quot;es6&quot;
        ],
        &quot;target&quot;: &quot;es6&quot;,
        &quot;module&quot;: &quot;commonjs&quot;,
        &quot;moduleResolution&quot;: &quot;node&quot;,
        &quot;outDir&quot;: &quot;dist&quot;,
        &quot;resolveJsonModule&quot;: true,
        &quot;emitDecoratorMetadata&quot;: true,
        &quot;esModuleInterop&quot;: true,
        &quot;experimentalDecorators&quot;: true,
        &quot;sourceMap&quot;: true
     },
     &quot;include&quot;: [&quot;src/**/*.ts&quot;],
     &quot;exclude&quot;: [&quot;node_modules&quot;, &quot;**/*.spec.ts&quot;]
  }
  </code></pre>