title: Getting Typescript 2 paths mapping (aliases) working
body: <p>I am trying to reference custom modules shortcuts (ie use <code>ts</code> paths mapping feature) for my typescript app, with the following config.</p>
  
  <p><strong>Project structure</strong></p>
  
  <pre><code>dist/
  
  src/
    lyrics/
       ... ts files
    app/
       ... ts files
  </code></pre>
  
  <p>Full project structure is here: <a href="https://github.com/adadgio/npm-lyrics-ts" rel="nofollow noreferrer">github.com/adadgio/npm-lyrics-ts</a>, dist folder is not commited of course)</p>
  
  <p><strong>tsconfig.json</strong></p>
  
  <pre><code>{
      "compilerOptions": {
          "outDir": "dist",
          "module": "commonjs",
          "target": "es6",
          "sourceMap": true,
          "moduleResolution": "node",
          "experimentalDecorators": true,
          "emitDecoratorMetadata": true,
          "removeComments": true,
          "noImplicitAny": false,
          "baseUrl": ".",
          "paths": {
              "*": ["src/lyrics/*"], // to much here !! but none work
              "zutils/*": ["./src/lyrics/*", "src/lyrics/utils/*", "dist/lyrics/utils/*"]
          },
          "rootDir": "."
      },
      "exclude": [
          "dist",
          "node_modules"
      ],
      "include": [
          "src/**/*.ts"
      ]
  }
  </code></pre>
  
  <p>When i run my npm start/compile or watch script, i get no Typescript errors. The following works (Atom is my IDE)</p>
  
  <pre><code>// string-utils.ts does exist, no IDE error, typescript DOES compile
  `import { StringUtils } from 'zutils/string-utils';` 
  </code></pre>
  
  <p>But i then get the NodeJS following error:</p>
  
  <pre><code>Error: Cannot find module 'zutils/string-utils'
      at Function.Module._resolveFilename (module.js:470:15)
      at Function.Module._load (module.js:418:25)
      at Module.require (module.js:498:17)
      at require (internal/module.js:20:19)
      at Object.&lt;anonymous&gt; (/home/adadgio/WebServer/projects/adadgio/npm-lyrics-ts/src/index.ts:7:1)
      at Module._compile (module.js:571:32)
      at Module.m._compile (/home/adadgio/WebServer/projects/adadgio/npm-lyrics-ts/node_modules/ts-node/src/index.ts:413:23)
      at Module._extensions..js (module.js:580:10)
      at Object.require.extensions.(anonymous function) [as .ts] (/home/adadgio/WebServer/projects/adadgio/npm-lyrics-ts/node_modules/ts-node/src/index.ts:416:12)
      at Module.load (module.js:488:32)
  </code></pre>
  
  <p>It looks like the module is trying to be resolved from the <code>node_modules</code> folder. I've read docs about Typescript paths mapping but i cannot get it to work.</p>