title: Compiling Angular 2 as commonjs
body: <p>I want to compile Angular 2 project as <code>commonjs</code> module.</p>
  
  <p>I have this <code>tsconfig.json</code>:</p>
  
  <pre><code>{
    "compilerOptions": {
      "declaration": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "mapRoot": "./",
      "module": "commonjs",
      "moduleResolution": "node",
      "outDir": "../dist/lib",
      "sourceMap": true,
      "target": "es5",
      "removeComments": true
    }
  }
  </code></pre>
  
  <p>I use <code>ntsc</code> and I got these kind of errors:</p>
  
  <pre><code>node_modules/@angular/common/src/directives/ng_class.d.ts(46,34): error TS2304: Cannot find name 'Set'.
  node_modules/@angular/common/src/pipes/async_pipe.d.ts(44,38): error TS2304: Cannot find name 'Promise'.
  node_modules/@angular/compiler/src/aot/compiler.d.ts(32,38): error TS2304: Cannot find name 'Promise'.
  node_modules/@angular/compiler/src/aot/compiler.d.ts(44,32): error TS2304: Cannot find name 'Map'.
  </code></pre>
  
  <p>I have <code>npm</code> version <code>4.0.5</code>, <code>node</code> <code>v7.3.0</code> and <code>ntsc</code> <code>Version 2.1.0</code></p>