title: Node Error: Cannot find module - typescript api for custom module where I export mongoose schemas and interfaces
body: <p>I have a typescript module <a href="https://www.npmjs.com/package/@tlabs/models" rel="nofollow noreferrer">@tlabs/models</a> where I'm simply exporting in index.ts: </p>
  
  <pre><code>export * from '../models......'
  </code></pre>
  
  <p>where in each file I have something like: </p>
  
  <pre><code>export const Project = typedModel('projects', ProjectSchema);
  </code></pre>
  
  <p>and my only dependency is <code>ts-mongoose</code> imported in each file simply as: </p>
  
  <pre><code>import { createSchema, Type, typedModel, ExtractProps } from 'ts-mongoose';
  </code></pre>
  
  <p>ts-mongoose being a dependency that itself required mongoose + mongoose types. </p>
  
  <p>In my typescript node project I have <code>ts-mongoose</code>, <code>mongoose</code> and @tlabs/models as dependencies and <code>@types/mongoose</code> as dev dependency.</p>
  
  <p>Running tsc is fine, the files get compiled and there's no error being thrown out but then trying to run the actual files throws out: </p>
  
  <pre><code>Error: Cannot find module '@tlabs/models'
  </code></pre>
  
  <p>I have reinstalled all modules several times and checked package.json as well as the actual files on the disk + through vscode and they're right there. </p>
  
  <p>What am I missing out?</p>
  
  <p>My tsconfig is:</p>
  
  <pre><code>{
    "include": ["src/**/*"],
    "exclude": ["node_modules", "./node_modules", "./node_modules/*"],
    "compilerOptions": {
      "module": "commonjs",
      "esModuleInterop": true,
      "target": "es6",
      "allowJs": true,
      "moduleResolution": "node",
      "sourceMap": true,
      "outDir": "dist",
      "noImplicitAny": false,
      "alwaysStrict": true,
      "strictNullChecks": true,
      "types": [],
      "lib": [],
      "experimentalDecorators": true
    }
  }
  
  </code></pre>