title: How to use (mqtt) js library in angular 2 typescript app?
body: <p>I closely paralleled the approach taken in <a href="https://stackoverflow.com/questions/35166168/how-to-use-moment-js-library-in-angular-2-typescript-app">how-to-use-moment-js-library-in-angular-2-typescript-app</a> but still get <code>error TS2307: Cannot find module 'mqtt'.</code> </p>
  
  <pre><code>npm install --save mqtt
  &lt;s&gt;typings install --save mqtt&lt;/s
  </code></pre>
  
  <p>that didn't find the typings but this did...</p>
  
  <pre><code>typings install mqtt --save --ambient 
  </code></pre>
  
  <p>my tsconfig.conf looks like this</p>
  
  <pre><code>{
      "compilerOptions": {
          "noImplicitAny": true,
          "module": "commonjs",
          "target": "ES5",
          "emitDecoratorMetadata": true,
          "experimentalDecorators": true,
          "sourceMap": true,
          "declaration": true
      },
      "files": [
          "ng2-mqtt.ts"
      ],
      "exclude": [
          "node_modules"
      ]
  }
  </code></pre>
  
  <p>and <code>ng2-mqtt.ts</code> just has this...</p>
  
  <pre><code>export * from './src/mqtt.service'
  </code></pre>
  
  <p>and <code>./src/mqtt.service.ts</code> has..</p>
  
  <pre><code>import {Injectable} from 'angular2/core';
  import * as mqtt from 'mqtt';
  @Injectable() 
  export class MqttService {
    constructor() {
       //mqtt.connect('ws://10.0.1.100:3333')
       // ...
    }
  }
  </code></pre>
  
  <p>tsc -version 1.8.10, angular2@2.0.0-beta.17, typings 0.8.1, npm 2.14.20, node v4.4.1, Windows 7</p>
  
  <p>Is it just going to be too hard to use Angular 2 with elements outside of its typescripted world?</p>