title: How to resolve relative paths with tsc in CodeBuild/Ubuntu (TS2307)?
body: <p>I fail to transpile my typescript files in AWS CodeBuild (Ubuntu image) with TS2307 error failing to resolve my own files. </p>
  
  <p>Of course, I tried the exact same project locally. Invoking <code>tsc</code> which is reading my tsconfig.json file in the root of the project directory. Then I would run <code>node ./dist/index.js</code> to execute the app with node (and not <code>ts-node ./src/index.ts</code>). Works (the REST services provide json data).</p>
  
  <p>In AWS CodeBuild the <code>tsc</code> fails.</p>
  
  <p>These are my code lines which fail to be resolve relatively. Before there are absolute imports (e.g. <code>import * as express from 'express'</code>) which all work fine.</p>
  
  <p>Does someone have any clue why that does not resolve/transpile in AWS CodeBuild despite it is the same project files (all after a pull from github)?  What flag am I missing?</p>
  
  <p>I'm using Windows locally. And Ubuntu in CodeBuild.</p>
  
  <pre><code>import { TermEndpoints } from './endpoints/termEndpoints'
  import { TranslationEndpoints } from './endpoints/translationEndpoints'
  import { LanguageEndpoints } from './endpoints/LanguageEndpoints'
  import { NavLangEndpoints} from './endpoints/navLangEndpoints'
  import { InfoEndpoint } from './endpoints/infoEndpoint'
  </code></pre>
  
  <p>My tsconfig.json file is</p>
  
  <pre><code>{
      "compilerOptions": {
          "baseUrl": "./src/",
          "outDir": "./dist",
          "allowJs": true,
          "target": "es2017",        
          "module": "commonjs",
          "moduleResolution": "node",
          "sourceMap": false,
          "strict": false,
          "declaration": true,
          "experimentalDecorators": true,
          "importHelpers": true,
          "esModuleInterop": false,
          "resolveJsonModule": true,
          "removeComments": true,
          "types": ["node"],
          "typeRoots": [
              "node_modules/@types"
          ],
          "lib": [ "es2017", "dom" ]
      },
      "include": [
          "./src/**/*"
      ]
  }
  </code></pre>
  
  <p>Log file from Code Build</p>
  
  <pre><code>[Container] 2020/05/11 10:06:10 Running command npm install typescript
  npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.2 (node_modules/fsevents):
  npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
  
  + typescript@3.8.3
  updated 1 package and audited 655 packages in 2.484s
  
  found 0 vulnerabilities
  
  
  [Container] 2020/05/11 10:06:13 Running command tsc --version
  Version 3.8.3
  
  [Container] 2020/05/11 10:06:13 Running command npm run build:acc
  
  &gt; sem-translator-api@0.0.1 build:acc /codebuild/output/src400516343/src/github.com/svabra/semtranslatorapi
  &gt; tsc
  
  src/ExpressServer.ts(11,31): error TS2307: Cannot find module './endpoints/termEndpoints'.
  src/ExpressServer.ts(12,38): error TS2307: Cannot find module './endpoints/translationEndpoints'.
  src/ExpressServer.ts(13,35): error TS2307: Cannot find module './endpoints/LanguageEndpoints'.
  src/models/relation.ts(3,22): error TS2307: Cannot find module './Term'.
  npm ERR! code ELIFECYCLE
  npm ERR! errno 2
  npm ERR! sem-translator-api@0.0.1 build:acc: `tsc`
  npm ERR! Exit status 2
  npm ERR! 
  npm ERR! Failed at the sem-translator-api@0.0.1 build:acc script.
  npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
  
  npm ERR! A complete log of this run can be found in:
  npm ERR!     /root/.npm/_logs/2020-05-11T10_06_18_948Z-debug.log
  
  [Container] 2020/05/11 10:06:18 Command did not exit successfully npm run build:acc exit status 2
  [Container] 2020/05/11 10:06:19 Phase complete: BUILD State: FAILED
  [Container] 2020/05/11 10:06:19 Phase context status code: COMMAND_EXECUTION_ERROR Message: Error while executing command: npm run build:acc. Reason: exit status 2
  </code></pre>