如何在Webstorm 11中调试JSPM-SystemJS-AngularJS项目

时间:2016-03-11 16:38:22

标签: angularjs systemjs jspm

在Webstorm 11中调试我的项目我收到错误。 如果我运行项目,它运行正常。

我关注JSPM - Getting Started。调试Javascript模块很好。一旦我尝试将Angular集成到我的项目中,就会出现错误。

我做错了什么?

调试时出错:

    Uncaught (in promise) Error: ReferenceError: module is not defined
            at eval (http://localhost:63342/JSPM-Angular-playground/jspm_packages/npm/babel-core@5.8.35.js:1:1)
        Evaluating http://localhost:63342/JSPM-Angular-playground/jspm_packages/npm/babel-core@5.8.35.js
        Error loading http://localhost:63342/JSPM-Angular-playground/jspm_packages/npm/babel-core@5.8.35.js
        Error loading http://localhost:63342/JSPM-Angular-playground/app/app.js
      t 
      g 
      (anonymous function)  

项目设置:

的package.json

  {
    "jspm": {
      "dependencies": {
        "angular": "github:angular/bower-angular@^1.5.0"
      },
      "devDependencies": {
        "babel": "npm:babel-core@^5.8.24",
        "babel-runtime": "npm:babel-runtime@^5.8.24",
        "core-js": "npm:core-js@^1.1.4"
      }
    },
    "devDependencies": {
      "jspm": "^0.16.31"
    }
  }

config.js

    System.config({
    baseURL: "/JSPM-Angular-playground",
    defaultJSExtensions: true,
    transpiler: "babel",
    babelOptions: {
      "optional": [
        "runtime",
        "optimisation.modules.system"
      ]
    },
    paths: {
      "github:*": "jspm_packages/github/*",
      "npm:*": "jspm_packages/npm/*"
    },

    map: {
      "angular": "github:angular/bower-angular@1.5.0",
      "babel": "npm:babel-core@5.8.35",
      "babel-runtime": "npm:babel-runtime@5.8.35",
      "core-js": "npm:core-js@1.2.6",
      "github:jspm/nodelibs-assert@0.1.0": {
        "assert": "npm:assert@1.3.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.2"
      },
      "github:jspm/nodelibs-util@0.1.0": {
        "util": "npm:util@0.10.3"
      },
      "npm:assert@1.3.0": {
        "util": "npm:util@0.10.3"
      },
      "npm:babel-runtime@5.8.35": {
        "process": "github:jspm/nodelibs-process@0.1.2"
      },
      "npm:core-js@1.2.6": {
        "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.0"
      },
      "npm:inherits@2.0.1": {
        "util": "github:jspm/nodelibs-util@0.1.0"
      },
      "npm:path-browserify@0.0.0": {
        "process": "github:jspm/nodelibs-process@0.1.2"
      },
      "npm:process@0.11.2": {
        "assert": "github:jspm/nodelibs-assert@0.1.0"
      },
      "npm:util@0.10.3": {
        "inherits": "npm:inherits@2.0.1",
        "process": "github:jspm/nodelibs-process@0.1.2"
      }
    }
  });

0 个答案:

没有答案