title: Error: Cannot find module related to relative path from typescript to javascript
body: <p>In our Automation test we are using Protractor with Typescript. So we want to avoid the relative path.
  So in typescript we are using the baseURL and Path to resolve the relative path which is compiling fine.</p>
  
  <pre><code>  "compilerOptions": { 
      "target": "es5", 
      "module": "commonjs", 
      "moduleResolution": "node", 
      "sourceMap": true, 
      "declaration": false, 
      "removeComments": false, 
      "noImplicitAny": false, 
      "emitDecoratorMetadata":true,
      "experimentalDecorators": true,
      "outDir": "jsout", 
      "types": ["jasmine", "node"],
      "allowJs": true,
      "baseUrl": ".",
       "paths": {
          "factory/*":["factories/*"]        
      }
  
  import{FactoryRegistry} from 'factory/FactoryRegistry.ts'
  
  
  However, when we are running our spec file, the run time error is thrown 
   E/launcher - Error: Error: Cannot find module 'factory/FactoryRegistry.ts'
  </code></pre>
  
  <p>This is because the path which is resolved in TS Spec file is not resolved in JS Spec file. In JS spec file its says something like this</p>
  
  <pre><code>var FactoryRegistry_ts_1 = require("factory/FactoryRegistry.ts");
  </code></pre>
  
  <p>instead of <code>"./../../../factories/FactoryRegistry"</code></p>
  
  <p>So how can we resolve this when converting from TS to JS</p>