Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular2 jspm依赖性问题_Angular_Jspm - Fatal编程技术网

Angular2 jspm依赖性问题

Angular2 jspm依赖性问题,angular,jspm,Angular,Jspm,在切换到jspm进行Angular2包管理(而不是使用script标记)之后,我有一些没有加载。它似乎在根目录中查找它们,而不是在config.js中指定的jspm位置 Failed to load resource: the server responded with a status of 404 (Not Found) Error: XHR error (404 Not Found) loading http://localhost:55707/zone.js(…) http://loca

在切换到jspm进行Angular2包管理(而不是使用script标记)之后,我有一些没有加载。它似乎在根目录中查找它们,而不是在config.js中指定的jspm位置

Failed to load resource: the server responded with a status of 404 (Not Found)
Error: XHR error (404 Not Found) loading http://localhost:55707/zone.js(…)
http://localhost:55707/reflect-metadata.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:55707/es6-shim.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:55707/rxjs/add/operator/map.js Failed to load resource: the server responded with a status of 404 (Not Found)
Config.js

System.config({
  baseURL: "/",
  defaultJSExtensions: true,
  transpiler: "typescript",
  paths: {
    "npm:*": "jspm_packages/npm/*",
    "github:*": "jspm_packages/github/*"
  },

  map: {
    "angular2": "npm:angular2@2.0.0-beta.1",
    "typescript": "npm:typescript@1.7.5",
    "github:jspm/nodelibs-assert@0.1.0": {
      "assert": "npm:assert@1.3.0"
    }, 
    "npm:angular2@2.0.0-beta.1": {
      "crypto": "github:jspm/nodelibs-crypto@0.1.0",
      "es6-promise": "npm:es6-promise@3.0.2",
      "es6-shim": "npm:es6-shim@0.33.13",
      "process": "github:jspm/nodelibs-process@0.1.2",
      "reflect-metadata": "npm:reflect-metadata@0.1.2",
      "rxjs": "npm:rxjs@5.0.0-beta.0",
      "zone.js": "npm:zone.js@0.5.10"
    },
    // -- more mappings
  }
});

如果您直接通过包导入
zone.js
,则需要为其添加一个
map
条目

    "angular2": "npm:angular2@2.0.0-beta.1",
    "typescript": "npm:typescript@1.7.5",
    "zone.js": "npm:zone.js@0.5.10", //<-- Add this line
    "github:jspm/nodelibs-assert@0.1.0": {
“angular2”:“npm:angular2@2.0.0-beta.1“,
“类型脚本”:“npm:typescript@1.7.5",
“zone.js”:“npm:zone。js@0.5.10", //