Angular2 - 加载映射模块时出现 SystemJS 404

Angular2 - SystemJS 404 when loading mapped modules

我在我的第一个 Angular2 项目中工作,一切都很好,直到我尝试从浏览器转译 TS 转移到转译作为构建周期的一部分。所以现在我把所有东西都转换成 es5,但是我遗漏了 systemjs 的一些东西,因为我在 System.config 中映射的任何东西都出现 404 错误,特别是 angular2-jwt,这是我的 config.js

System.config({
packages: {
    app: {
        defaultExtension: "js",
        main: "main"
    },
    map: {
        "angular2-jwt": "node_modules/angular2-jwt/angular2-jwt.js"
    },
    "angular2-jwt": {"defaultExtension": "js"}
}
});

这是我的切入点,main.ts

/// <reference path="../node_modules/angular2/typings/browser.d.ts" />

import {bootstrap} from 'angular2/platform/browser';
import {provide} from 'angular2/core';
import {AuthHttp, AuthConfig} from 'angular2-jwt';
import {ROUTER_PROVIDERS, LocationStrategy, HashLocationStrategy,     APP_BASE_HREF} from 'angular2/router';
import {HTTP_PROVIDERS, Http} from 'angular2/http';
import {ToastyService, ToastyConfig, Toasty} from 'ng2-toasty/ng2-toasty';

import {ApplicationComponent} from './components/application/application.component';

import {MenuService} from './services/menu/menu-service';
import {MessageService} from './services/messages/message-service';

bootstrap(ApplicationComponent, [
ROUTER_PROVIDERS,
HTTP_PROVIDERS,
ToastyService, 
ToastyConfig,
MessageService,
MenuService,
provide(AuthHttp, {
useFactory: (http) => {
  return new AuthHttp(new AuthConfig(), http);
},
deps: [Http]
}),
 provide(LocationStrategy, {useClass: HashLocationStrategy})
]);

当我尝试加载应用程序时,现在我得到...

angular2-polyfills.js:126 GET http://localhost:8080/angular2-jwt 404 (Not Found)

所以浏览器正试图从我的

导入语句路径加载文件
import {AuthHttp, AuthConfig} from 'angular2-jwt';

而不是映射路径:

 map: {
        "angular2-jwt": "node_modules/angular2-jwt/angular2-jwt.js"
    },

在我的 config.js.

我在这里错过了什么?如何让浏览器从 in node_modules 的完整路径中拉取 angular2-jwt?谢谢!

map 应该是 packages

的兄弟姐妹
System.config({
    packages: {
        app: {
            defaultExtension: "js",
            main: "main"
        },
        "angular2-jwt": {"defaultExtension": "js"}
    },
    map: {
        "angular2-jwt": "node_modules/angular2-jwt/angular2-jwt.js"
    }
});

不然其他的我觉得还不错