title: error TS2307: Cannot find module (external, private module)
body: <p>I have read similiar questions including <a href="https://stackoverflow.com/questions/37548734/tsc-throws-ts2307-cannot-find-module-for-a-local-file">tsc throws `TS2307: Cannot find module` for a local file</a> .</p>
  
  <p>I have a privat external module (on a local git server) and I try to include that into my application - this works.</p>
  
  <ul>
  <li>phpStorm can resolve the classes perfectly!</li>
  <li>the app <strong>throws the error TS2307 but runs perfectly</strong>!</li>
  </ul>
  
  <p>I wonder why the transpiler throws this error although everything looks fine and I need this error to be gone for a stable deployment.</p>
  
  <p>The module tsconfig.json looks like:</p>
  
  <pre><code>{
      "compilerOptions": {
          "module": "commonjs",
          "moduleResolution": "node",
          "target": "ES6",
          "typeRoots": [
              "node_modules/@types"
          ],
          "sourceMap": false,
          "noImplicitAny": false,
          "declaration": true,
          "noResolve": false
      },
      "version": "2.0.0"
  }
  </code></pre>
  
  <p>I tried several combinations of the above without success.</p>
  
  <p>I have a <code>Main.ts</code> in the module like</p>
  
  <pre><code>export {default as Logger}  from "./Logger";
  export {ILogger as ILogger} from './ILogger';
  </code></pre>
  
  <p>Where the class and the interface are</p>
  
  <pre><code>export interface ILogger { }
  export default class Logger implements ILogger { }
  </code></pre>
  
  <p>And in the app I use:</p>
  
  <pre><code>import {Logger, ILogger} from "logging";
  </code></pre>
  
  <p>The error happens when I try to transpile the app, not the module. Again, everything works when running the app through node and when coding in phpStorm but on transpiling I get:</p>
  
  <pre><code>src/Main.ts(9,39): error TS2307: Cannot find module 'logging'.
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>Looks like a bug in <code>tsc</code>: <a href="https://github.com/Microsoft/TypeScript/issues/14332" rel="nofollow noreferrer">https://github.com/Microsoft/TypeScript/issues/14332</a></p>