Javascript 为什么umd SystemJS给我错误消息格式不正确

Javascript 为什么umd SystemJS给我错误消息格式不正确,javascript,reactjs,systemjs,Javascript,Reactjs,Systemjs,我只是想用systemJS创建模块化javascript并做出反应 在谷歌搜索它之后,会发现什么错误。这可能是因为XMLHTTPrequest,但我不知道如何在systemjs中设置它。 一切顺利。我可以使用systemJS运行react。但那个错误消息让我非常恼火 这是我的SystemJs.setup.js文件 System.config({ baseURL: "", defaultJSExtensions: true, transpiler: "babel", babelOptions: {

我只是想用systemJS创建模块化javascript并做出反应

在谷歌搜索它之后,会发现什么错误。这可能是因为XMLHTTPrequest,但我不知道如何在systemjs中设置它。 一切顺利。我可以使用systemJS运行react。但那个错误消息让我非常恼火

这是我的SystemJs.setup.js文件

System.config({
baseURL: "",
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
    "optional": [
    "runtime",
    "optimisation.modules.system"
    ]
},
paths: {
    "github:*": "jspm_packages/github/*",
    "npm:*": "jspm_packages/npm/*"
},
meta: {
    'test.js': {
    format: 'esm'
    }
    ,
    'main.js': {
    format: 'commonJS'
    }
},
map: {
    "babel": "npm:babel-core@5.8.38",
    "babel-runtime": "npm:babel-runtime@5.8.38",
    "core-js": "npm:core-js@1.2.7",
    "react": "npm:react@15.4.2",
    "react-dom": "npm:react-dom@15.4.2",
    "github:jspm/nodelibs-assert@0.1.0": {
    "assert": "npm:assert@1.4.1"
    },
    "github:jspm/nodelibs-buffer@0.1.0": {
    "buffer": "npm:buffer@3.6.0"
    },
    "github:jspm/nodelibs-domain@0.1.0": {
    "domain-browser": "npm:domain-browser@1.1.7"
    },
    "github:jspm/nodelibs-events@0.1.1": {
    "events": "npm:events@1.0.2"
    },
    "github:jspm/nodelibs-http@1.7.1": {
    "Base64": "npm:Base64@0.2.1",
    "events": "github:jspm/nodelibs-events@0.1.1",
    "inherits": "npm:inherits@2.0.1",
    "stream": "github:jspm/nodelibs-stream@0.1.0",
    "url": "github:jspm/nodelibs-url@0.1.0",
    "util": "github:jspm/nodelibs-util@0.1.0"
    },
    "github:jspm/nodelibs-https@0.1.0": {
    "https-browserify": "npm:https-browserify@0.0.0"
    },
    "github:jspm/nodelibs-path@0.1.0": {
    "path-browserify": "npm:path-browserify@0.0.0"
    },
    "github:jspm/nodelibs-process@0.1.2": {
    "process": "npm:process@0.11.9"
    },
    "github:jspm/nodelibs-stream@0.1.0": {
    "stream-browserify": "npm:stream-browserify@1.0.0"
    },
    "github:jspm/nodelibs-string_decoder@0.1.0": {
    "string_decoder": "npm:string_decoder@0.10.31"
    },
    "github:jspm/nodelibs-url@0.1.0": {
    "url": "npm:url@0.10.3"
    },
    "github:jspm/nodelibs-util@0.1.0": {
    "util": "npm:util@0.10.3"
    },
    "github:jspm/nodelibs-vm@0.1.0": {
    "vm-browserify": "npm:vm-browserify@0.0.4"
    },
    "github:jspm/nodelibs-zlib@0.1.0": {
    "browserify-zlib": "npm:browserify-zlib@0.1.4"
    },
    "npm:asap@2.0.5": {
    "domain": "github:jspm/nodelibs-domain@0.1.0",
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:assert@1.4.1": {
    "assert": "github:jspm/nodelibs-assert@0.1.0",
    "buffer": "github:jspm/nodelibs-buffer@0.1.0",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "util": "npm:util@0.10.3"
    },
    "npm:babel-runtime@5.8.38": {
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:browserify-zlib@0.1.4": {
    "assert": "github:jspm/nodelibs-assert@0.1.0",
    "buffer": "github:jspm/nodelibs-buffer@0.1.0",
    "pako": "npm:pako@0.2.9",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "readable-stream": "npm:readable-stream@2.2.2",
    "util": "github:jspm/nodelibs-util@0.1.0"
    },
    "npm:buffer-shims@1.0.0": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0"
    },
    "npm:buffer@3.6.0": {
    "base64-js": "npm:base64-js@0.0.8",
    "child_process": "github:jspm/nodelibs-child_process@0.1.0",
    "fs": "github:jspm/nodelibs-fs@0.1.2",
    "ieee754": "npm:ieee754@1.1.8",
    "isarray": "npm:isarray@1.0.0",
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:core-js@1.2.7": {
    "fs": "github:jspm/nodelibs-fs@0.1.2",
    "path": "github:jspm/nodelibs-path@0.1.0",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "systemjs-json": "github:systemjs/plugin-json@0.1.2"
    },
    "npm:core-util-is@1.0.2": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0"
    },
    "npm:domain-browser@1.1.7": {
    "events": "github:jspm/nodelibs-events@0.1.1"
    },
    "npm:encoding@0.1.12": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0",
    "iconv-lite": "npm:iconv-lite@0.4.15"
    },
    "npm:fbjs@0.8.8": {
    "core-js": "npm:core-js@1.2.7",
    "isomorphic-fetch": "npm:isomorphic-fetch@2.2.1",
    "loose-envify": "npm:loose-envify@1.3.0",
    "object-assign": "npm:object-assign@4.1.0",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "promise": "npm:promise@7.1.1",
    "setimmediate": "npm:setimmediate@1.0.5",
    "ua-parser-js": "npm:ua-parser-js@0.7.12"
    },
    "npm:https-browserify@0.0.0": {
    "http": "github:jspm/nodelibs-http@1.7.1"
    },
    "npm:iconv-lite@0.4.15": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "stream": "github:jspm/nodelibs-stream@0.1.0",
    "string_decoder": "github:jspm/nodelibs-string_decoder@0.1.0",
    "systemjs-json": "github:systemjs/plugin-json@0.1.2"
    },
    "npm:inherits@2.0.1": {
    "util": "github:jspm/nodelibs-util@0.1.0"
    },
    "npm:isomorphic-fetch@2.2.1": {
    "node-fetch": "npm:node-fetch@1.6.3",
    "whatwg-fetch": "npm:whatwg-fetch@2.0.1"
    },
    "npm:loose-envify@1.3.0": {
    "fs": "github:jspm/nodelibs-fs@0.1.2",
    "js-tokens": "npm:js-tokens@2.0.0",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "stream": "github:jspm/nodelibs-stream@0.1.0",
    "util": "github:jspm/nodelibs-util@0.1.0"
    },
    "npm:node-fetch@1.6.3": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0",
    "encoding": "npm:encoding@0.1.12",
    "http": "github:jspm/nodelibs-http@1.7.1",
    "https": "github:jspm/nodelibs-https@0.1.0",
    "is-stream": "npm:is-stream@1.1.0",
    "stream": "github:jspm/nodelibs-stream@0.1.0",
    "url": "github:jspm/nodelibs-url@0.1.0",
    "util": "github:jspm/nodelibs-util@0.1.0",
    "zlib": "github:jspm/nodelibs-zlib@0.1.0"
    },
    "npm:pako@0.2.9": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0",
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:path-browserify@0.0.0": {
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:process-nextick-args@1.0.7": {
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:process@0.11.9": {
    "assert": "github:jspm/nodelibs-assert@0.1.0",
    "fs": "github:jspm/nodelibs-fs@0.1.2",
    "vm": "github:jspm/nodelibs-vm@0.1.0"
    },
    "npm:promise@7.1.1": {
    "asap": "npm:asap@2.0.5",
    "fs": "github:jspm/nodelibs-fs@0.1.2"
    },
    "npm:punycode@1.3.2": {
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:react-dom@15.4.2": {
    "fbjs": "npm:fbjs@0.8.8",
    "loose-envify": "npm:loose-envify@1.3.0",
    "object-assign": "npm:object-assign@4.1.0",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "react": "npm:react@15.4.2"
    },
    "npm:react@15.4.2": {
    "fbjs": "npm:fbjs@0.8.8",
    "loose-envify": "npm:loose-envify@1.3.0",
    "object-assign": "npm:object-assign@4.1.0",
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:readable-stream@1.1.14": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0",
    "core-util-is": "npm:core-util-is@1.0.2",
    "events": "github:jspm/nodelibs-events@0.1.1",
    "inherits": "npm:inherits@2.0.1",
    "isarray": "npm:isarray@0.0.1",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "stream-browserify": "npm:stream-browserify@1.0.0",
    "string_decoder": "npm:string_decoder@0.10.31"
    },
    "npm:readable-stream@2.2.2": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0",
    "buffer-shims": "npm:buffer-shims@1.0.0",
    "core-util-is": "npm:core-util-is@1.0.2",
    "events": "github:jspm/nodelibs-events@0.1.1",
    "inherits": "npm:inherits@2.0.1",
    "isarray": "npm:isarray@1.0.0",
    "process": "github:jspm/nodelibs-process@0.1.2",
    "process-nextick-args": "npm:process-nextick-args@1.0.7",
    "string_decoder": "npm:string_decoder@0.10.31",
    "util-deprecate": "npm:util-deprecate@1.0.2"
    },
    "npm:setimmediate@1.0.5": {
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:stream-browserify@1.0.0": {
    "events": "github:jspm/nodelibs-events@0.1.1",
    "inherits": "npm:inherits@2.0.1",
    "readable-stream": "npm:readable-stream@1.1.14"
    },
    "npm:string_decoder@0.10.31": {
    "buffer": "github:jspm/nodelibs-buffer@0.1.0"
    },
    "npm:ua-parser-js@0.7.12": {
    "systemjs-json": "github:systemjs/plugin-json@0.1.2"
    },
    "npm:url@0.10.3": {
    "assert": "github:jspm/nodelibs-assert@0.1.0",
    "punycode": "npm:punycode@1.3.2",
    "querystring": "npm:querystring@0.2.0",
    "util": "github:jspm/nodelibs-util@0.1.0"
    },
    "npm:util-deprecate@1.0.2": {
    "util": "github:jspm/nodelibs-util@0.1.0"
    },
    "npm:util@0.10.3": {
    "inherits": "npm:inherits@2.0.1",
    "process": "github:jspm/nodelibs-process@0.1.2"
    },
    "npm:vm-browserify@0.0.4": {
    "indexof": "npm:indexof@0.0.1"
    }
}
});


ps:很抱歉我的英语很差…

在本地服务器上运行它。。。

请注意,在本地运行时,请确保从本地服务器或启用了本地XHR请求的浏览器运行。如果没有,您将收到一条错误消息

对于Mac上的Chrome,您可以使用:/Applications/Google\Chrome.app/Contents/MacOS/Google\Chrome——允许从文件访问文件&>/dev/null&

在Firefox中,这需要导航到about:config,在过滤器框中输入>security.fileuri.strict_origin_policy并将选项切换为false