title: Try to add Stomp over SockJS to angular app: TS2307 Cannot find module
body: <p>I've downloaded a working plain-old-javascript example for connecting to websocket Spring channel and I'm struggling with importing this functionality to angular 2 application.</p>
  
  <p>I've added imports to package.json:</p>
  
  <pre><code>  "dependencies": {
      "@angular/common": "~2.2.1",
      (...)
      "stompjs": "2.3.3",
      "sockjs-client": "1.1.1"
    },
  </code></pre>
  
  <p>Then a suggested edit to systemjs.config.js:</p>
  
  <pre><code>(function (global) {
      System.config({
          paths: {
              // paths serve as alias
              'npm:': 'node_modules/'
          },
          // map tells the System loader where to look for things
          map: {
              // our app is within the app folder
              app: 'app',
              // angular bundles
              '@angular/core': 'npm:@angular/core/bundles/core.umd.js',
              (...)
              'sockjs-client': 'npm:sockjs-client',
              'stompjs': 'npm:stompjs'
          },
          // packages tells the System loader how to load when no filename and/or no extension
          packages: {
              (...)
              'sockjs-client': {
                  defaultExtension: 'js'
              },
              stompjs: {
                  defaultExtension: 'js'
              }
          }
      });
  })(this);
  </code></pre>
  
  <p>But when I add the import </p>
  
  <pre><code>import {Stomp} from "stompjs";
  </code></pre>
  
  <p>I get the "TS2307: Cannot find module" error message and the code compiled to:</p>
  
  <pre><code>var stompjs_1 = require("stompjs");
  </code></pre>
  
  <p>results in invalid http url:</p>
  
  <pre><code>http://localhost/myapp/node_modules/stomp-client
  </code></pre>
  
  <p>instead of path to JS file.</p>
  
  <p>What I've made wrong here? I've searched many SO answers, such as here: <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> and I've tried to do everything similar. I've also tried alternative import syntaxes like:</p>
  
  <pre><code>import * as Stomp from 'stompjs';
  </code></pre>
  
  <p>but nothing works. </p>
  
  <p>How to use both libraries in Angular2?</p>