jspm dependency angular-ui-router -> angular not working

78 views
Skip to first unread message

Benjamin Strauß

unread,
Jul 4, 2016, 1:07:13 PM7/4/16
to jspm
Hi, I have a problem with dependencies on angular packages.

angular-ui-router expects the global angular object but does not have any explicit dependency. I read about package overrides and used this command to add them:

jspm install angular-ui-router=github:angular-ui/angular-ui-router-bower -o "{shim:{'angular-ui-router':{ deps: ['angular'] }}}"

My package.json looks like this:

"jspm": {
  "directories": {
    "baseURL": "..",
    "packages": "jspm_packages"
  },
  "configFile": "config.js",
  "dependencies": {
    "angular": "github:angular/bower-angular@^1.5.7",
    "angular-ui-router": "github:angular-ui/angular-ui-router-bower@^0.3.1",
    "babel": "npm:babel-core@^5.8.24",
    "babel-runtime": "npm:babel-runtime@^5.8.24"
  },
  "devDependencies": {
    "core-js": "npm:core-js@^1.1.4"
  },
  "overrides": {
    "github:angular-ui/angular-ui-...@0.3.1": {
      "shim": {
        "angular-ui-router": {
          "deps": [
            "angular"
          ]
        }
      }
    }
  }
}


After bundling with bundle-sfx it still doesn't work.

I just found out that the registry actually has a definition for angular-ui-router:


but the angular version I'm using is not listed here:


Maybe that is the problem?
Reply all
Reply to author
Forward
0 new messages