{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/737","labels_url":"https://api.github.com/repos/systemjs/systemjs/issues/737/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/systemjs/issues/737/comments","events_url":"https://api.github.com/repos/systemjs/systemjs/issues/737/events","html_url":"https://github.com/systemjs/systemjs/issues/737","id":103790241,"number":737,"title":"I need help setting up Aurelia and SystemJS correctly ","user":{"login":"eyalsk","id":3756641,"avatar_url":"https://avatars.githubusercontent.com/u/3756641?v=3","gravatar_id":"","url":"https://api.github.com/users/eyalsk","html_url":"https://github.com/eyalsk","followers_url":"https://api.github.com/users/eyalsk/followers","following_url":"https://api.github.com/users/eyalsk/following{/other_user}","gists_url":"https://api.github.com/users/eyalsk/gists{/gist_id}","starred_url":"https://api.github.com/users/eyalsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyalsk/subscriptions","organizations_url":"https://api.github.com/users/eyalsk/orgs","repos_url":"https://api.github.com/users/eyalsk/repos","events_url":"https://api.github.com/users/eyalsk/events{/privacy}","received_events_url":"https://api.github.com/users/eyalsk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/systemjs/systemjs/labels/support","name":"support","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-28T20:27:12Z","updated_at":"2015-09-09T20:55:56Z","closed_at":null,"body":"I don't know whether it's a bug in Aurelia, SystemJS or just a failure in the actual configuration but I know that I managed to get this to work with Angular 2.0.\r\n\r\nI have two projects, project A is where I have the client-side application and project B is where I have all the JSPM dependencies, project B is kinda like a private CDN.\r\n\r\nProject A is hosted at http://localhost:5000\r\nProject B is hosted at http://localhost:5005\r\n\r\nHere is my basic index.html setup for Aurelia that resides in project A.\r\n```html\r\n<!DOCTYPE html>\r\n<html>\r\n\t<head>\r\n\t\t<base href=\"/\"/>\r\n\t\t<meta charset=\"utf-8\">\r\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\"/>\r\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/>\r\n\t\t<script src=\"http://localhost:5005/jspm_packages/system.js\"></script>\r\n\t\t<script src=\"http://localhost:5005/config.js\"></script>\r\n\t</head>\r\n\t<body aurelia-app>\r\n\t\t<script>\r\n\t\t\tSystem.import(\"aurelia-bootstrapper\");\r\n\t\t</script>\r\n\t</body>\r\n</html>\r\n```\r\nHere is the config.js for systemjs that resides in project B.\r\n```js\r\nSystem.config({\r\n  baseURL: \"http://localhost:5005\",\r\n  defaultJSExtensions: true,\r\n  transpiler: \"none\",\r\n  paths: {\r\n    \"github:*\": \"jspm_packages/github/*\",\r\n    \"npm:*\": \"jspm_packages/npm/*\"\r\n  },\r\n\r\n  map: {\r\n    \"aurelia/bootstrapper\": \"github:aurelia/bootstrapper@0.16.0\",\r\n    \"github:aurelia/binding@0.8.6\": {\r\n      \"aurelia-dependency-injection\": \"github:aurelia/dependency-injection@0.9.2\",\r\n      \"aurelia-metadata\": \"github:aurelia/metadata@0.7.3\",\r\n      \"aurelia-task-queue\": \"github:aurelia/task-queue@0.6.2\",\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/bootstrapper@0.16.0\": {\r\n      \"aurelia-event-aggregator\": \"github:aurelia/event-aggregator@0.7.0\",\r\n      \"aurelia-framework\": \"github:aurelia/framework@0.15.0\",\r\n      \"aurelia-history\": \"github:aurelia/history@0.6.1\",\r\n      \"aurelia-history-browser\": \"github:aurelia/history-browser@0.7.0\",\r\n      \"aurelia-loader-default\": \"github:aurelia/loader-default@0.9.5\",\r\n      \"aurelia-logging-console\": \"github:aurelia/logging-console@0.6.2\",\r\n      \"aurelia-router\": \"github:aurelia/router@0.11.0\",\r\n      \"aurelia-templating\": \"github:aurelia/templating@0.14.4\",\r\n      \"aurelia-templating-binding\": \"github:aurelia/templating-binding@0.14.0\",\r\n      \"aurelia-templating-resources\": \"github:aurelia/templating-resources@0.14.0\",\r\n      \"aurelia-templating-router\": \"github:aurelia/templating-router@0.15.0\",\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/dependency-injection@0.9.2\": {\r\n      \"aurelia-logging\": \"github:aurelia/logging@0.6.4\",\r\n      \"aurelia-metadata\": \"github:aurelia/metadata@0.7.3\",\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/event-aggregator@0.7.0\": {\r\n      \"aurelia-logging\": \"github:aurelia/logging@0.6.4\"\r\n    },\r\n    \"github:aurelia/framework@0.15.0\": {\r\n      \"aurelia-binding\": \"github:aurelia/binding@0.8.6\",\r\n      \"aurelia-dependency-injection\": \"github:aurelia/dependency-injection@0.9.2\",\r\n      \"aurelia-loader\": \"github:aurelia/loader@0.8.7\",\r\n      \"aurelia-logging\": \"github:aurelia/logging@0.6.4\",\r\n      \"aurelia-metadata\": \"github:aurelia/metadata@0.7.3\",\r\n      \"aurelia-path\": \"github:aurelia/path@0.8.1\",\r\n      \"aurelia-task-queue\": \"github:aurelia/task-queue@0.6.2\",\r\n      \"aurelia-templating\": \"github:aurelia/templating@0.14.4\",\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/history-browser@0.7.0\": {\r\n      \"aurelia-history\": \"github:aurelia/history@0.6.1\",\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/loader-default@0.9.5\": {\r\n      \"aurelia-loader\": \"github:aurelia/loader@0.8.7\",\r\n      \"aurelia-metadata\": \"github:aurelia/metadata@0.7.3\"\r\n    },\r\n    \"github:aurelia/loader@0.8.7\": {\r\n      \"aurelia-html-template-element\": \"github:aurelia/html-template-element@0.2.0\",\r\n      \"aurelia-metadata\": \"github:aurelia/metadata@0.7.3\",\r\n      \"aurelia-path\": \"github:aurelia/path@0.8.1\",\r\n      \"core-js\": \"npm:core-js@0.9.18\",\r\n      \"webcomponentsjs\": \"github:webcomponents/webcomponentsjs@0.6.3\"\r\n    },\r\n    \"github:aurelia/logging-console@0.6.2\": {\r\n      \"aurelia-logging\": \"github:aurelia/logging@0.6.4\"\r\n    },\r\n    \"github:aurelia/metadata@0.7.3\": {\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/route-recognizer@0.6.2\": {\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/router@0.11.0\": {\r\n      \"aurelia-dependency-injection\": \"github:aurelia/dependency-injection@0.9.2\",\r\n      \"aurelia-event-aggregator\": \"github:aurelia/event-aggregator@0.7.0\",\r\n      \"aurelia-history\": \"github:aurelia/history@0.6.1\",\r\n      \"aurelia-logging\": \"github:aurelia/logging@0.6.4\",\r\n      \"aurelia-path\": \"github:aurelia/path@0.8.1\",\r\n      \"aurelia-route-recognizer\": \"github:aurelia/route-recognizer@0.6.2\",\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/templating-binding@0.14.0\": {\r\n      \"aurelia-binding\": \"github:aurelia/binding@0.8.6\",\r\n      \"aurelia-logging\": \"github:aurelia/logging@0.6.4\",\r\n      \"aurelia-templating\": \"github:aurelia/templating@0.14.4\"\r\n    },\r\n    \"github:aurelia/templating-resources@0.14.0\": {\r\n      \"aurelia-binding\": \"github:aurelia/binding@0.8.6\",\r\n      \"aurelia-dependency-injection\": \"github:aurelia/dependency-injection@0.9.2\",\r\n      \"aurelia-logging\": \"github:aurelia/logging@0.6.4\",\r\n      \"aurelia-task-queue\": \"github:aurelia/task-queue@0.6.2\",\r\n      \"aurelia-templating\": \"github:aurelia/templating@0.14.4\",\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:aurelia/templating-router@0.15.0\": {\r\n      \"aurelia-dependency-injection\": \"github:aurelia/dependency-injection@0.9.2\",\r\n      \"aurelia-metadata\": \"github:aurelia/metadata@0.7.3\",\r\n      \"aurelia-path\": \"github:aurelia/path@0.8.1\",\r\n      \"aurelia-router\": \"github:aurelia/router@0.11.0\",\r\n      \"aurelia-templating\": \"github:aurelia/templating@0.14.4\"\r\n    },\r\n    \"github:aurelia/templating@0.14.4\": {\r\n      \"aurelia-binding\": \"github:aurelia/binding@0.8.6\",\r\n      \"aurelia-dependency-injection\": \"github:aurelia/dependency-injection@0.9.2\",\r\n      \"aurelia-html-template-element\": \"github:aurelia/html-template-element@0.2.0\",\r\n      \"aurelia-loader\": \"github:aurelia/loader@0.8.7\",\r\n      \"aurelia-logging\": \"github:aurelia/logging@0.6.4\",\r\n      \"aurelia-metadata\": \"github:aurelia/metadata@0.7.3\",\r\n      \"aurelia-path\": \"github:aurelia/path@0.8.1\",\r\n      \"aurelia-task-queue\": \"github:aurelia/task-queue@0.6.2\",\r\n      \"core-js\": \"npm:core-js@0.9.18\"\r\n    },\r\n    \"github:jspm/nodelibs-process@0.1.1\": {\r\n      \"process\": \"npm:process@0.10.1\"\r\n    },\r\n    \"npm:core-js@0.9.18\": {\r\n      \"fs\": \"github:jspm/nodelibs-fs@0.1.2\",\r\n      \"process\": \"github:jspm/nodelibs-process@0.1.1\",\r\n      \"systemjs-json\": \"github:systemjs/plugin-json@0.1.0\"\r\n    }\r\n  }\r\n});\r\n```\r\n**Now, to the actual problem.**\r\n\r\nWhen I'm using System.import(\"aurelia-bootstrapper\"); I get the following error from the browser.\r\n\r\n```text\r\nGET XHR http://localhost:5005/aurelia-bootstrapper.js [HTTP/1.1 404 Not Found 1ms]\r\nno element found [aurelia-bootstrapper.js:1:1]\r\nError: XHR error (404 Not Found) loading http://localhost:5005/aurelia-bootstrapper.js\r\n\tError loading http://localhost:5005/aurelia-bootstrapper.js [system.js:4:0]\r\n```\r\nWhen I'm using System.import(\"aurelia/bootstrapper/aurelia-bootstrapper\"); I get yet a different error.\r\n```text\r\nmutating the [[Prototype]] of an object will cause your code to run very slowly; instead create the object with the correct initial [[Prototype]] value using Object.create [localhost:5000:41:6]\r\nGET XHR http://localhost:5005/aurelia-loader-default.js [HTTP/1.1 404 Not Found 0ms]\r\nno element found [aurelia-loader-default.js:1:1]\r\nUnhandled promise rejection Error: XHR error (404 Not Found) loading http://localhost:5005/aurelia-loader-default.js [es6.promise.js:139:1]\r\n\tError loading http://localhost:5005/aurelia-loader-default.js\r\nStack trace:\r\nr@http://localhost:5005/jspm_packages/system.js:4:10959\r\ne/</M/o.onreadystatechange@http://localhost:5005/jspm_packages/system.js:4:11484\r\n```"},"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/comments/139043399","html_url":"https://github.com/systemjs/systemjs/issues/737#issuecomment-139043399","issue_url":"https://api.github.com/repos/systemjs/systemjs/issues/737","id":139043399,"user":{"login":"eyalsk","id":3756641,"avatar_url":"https://avatars.githubusercontent.com/u/3756641?v=3","gravatar_id":"","url":"https://api.github.com/users/eyalsk","html_url":"https://github.com/eyalsk","followers_url":"https://api.github.com/users/eyalsk/followers","following_url":"https://api.github.com/users/eyalsk/following{/other_user}","gists_url":"https://api.github.com/users/eyalsk/gists{/gist_id}","starred_url":"https://api.github.com/users/eyalsk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eyalsk/subscriptions","organizations_url":"https://api.github.com/users/eyalsk/orgs","repos_url":"https://api.github.com/users/eyalsk/repos","events_url":"https://api.github.com/users/eyalsk/events{/privacy}","received_events_url":"https://api.github.com/users/eyalsk/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T20:55:56Z","updated_at":"2015-09-09T20:55:56Z","body":"Well, not really, what I did eventually and really didn't want to but I had to is add an additional step in my build process which basically downloads all the dependencies through the CLI of JSPM to the publish directory which is the directory that the publish task creates for deployment.\r\n\r\nI did this to experiment different architectures and thought that SystemJS will allow me to host the dependencies in a complete different server as if it was a local CDN but as I posted I get some errors and currently I don't have deep understanding on SystemJS or JSPM to fix them, I don't even know whether it's a bug or nonissue or maybe it's by design. :)\r\n\r\nSomeone told me (I think it was Zoltu on gitter) that it can work but I need to define all the projects files in the path directory or something, something that is not very friendly or desired imo.\r\n\r\nIf you want to explore this farther I can set things just to reproduce it and maybe we can make it work?"}}