{"action":"created","issue":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/440","labels_url":"https://api.github.com/repos/systemjs/systemjs/issues/440/labels{/name}","comments_url":"https://api.github.com/repos/systemjs/systemjs/issues/440/comments","events_url":"https://api.github.com/repos/systemjs/systemjs/issues/440/events","html_url":"https://github.com/systemjs/systemjs/issues/440","id":73546163,"number":440,"title":"SystemJS code breaking in PhantomJS","user":{"login":"Zensavona","id":425801,"avatar_url":"https://avatars.githubusercontent.com/u/425801?v=3","gravatar_id":"","url":"https://api.github.com/users/Zensavona","html_url":"https://github.com/Zensavona","followers_url":"https://api.github.com/users/Zensavona/followers","following_url":"https://api.github.com/users/Zensavona/following{/other_user}","gists_url":"https://api.github.com/users/Zensavona/gists{/gist_id}","starred_url":"https://api.github.com/users/Zensavona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Zensavona/subscriptions","organizations_url":"https://api.github.com/users/Zensavona/orgs","repos_url":"https://api.github.com/users/Zensavona/repos","events_url":"https://api.github.com/users/Zensavona/events{/privacy}","received_events_url":"https://api.github.com/users/Zensavona/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-06T07:48:15Z","updated_at":"2015-05-07T10:33:02Z","closed_at":null,"body":"Hi guys, I'm trying to get my code running in Phantom to run some tests, but it's breaking and I'm not exactly sure why.\r\n\r\nIt's an Aurelia/SystemJS based app and both my application and an Aurelia example using SystemJS break with Phantom. Here are the outputs from both:\r\n\r\n[app-contacts](https://github.com/aurelia/app-contacts):\r\n\r\n````\r\nCONSOLE: INFO [aurelia] Aurelia Starting (from line #undefined in \"undefined\")\r\nCONSOLE: DEBUG [aurelia] Loading plugin github:aurelia/templating-binding@0.11.0. (from line #undefined in \"undefined\")\r\nTypeError: Attempting to define property on object that is not extensible.\r\n\r\n  http://localhost:9001/:48 in defineProperty\r\n  http://localhost:9001/:36\r\n  http://localhost:9001/:29 in fastKey\r\n  http://localhost:9001/:115\r\n  http://localhost:9001/:10 in set\r\n  http://localhost:9001/:51 in set\r\n  http://localhost:9001/:14 in ensureOriginOnExports\r\n  http://localhost:9001/:131\r\n  http://localhost:9001/jspm_packages/es6-module-loader.js:7 in O\r\n  http://localhost:9001/jspm_packages/es6-module-loader.js:7 in K\r\n  http://localhost:9001/jspm_packages/es6-module-loader.js:7\r\n  http://localhost:9001/jspm_packages/es6-module-loader.js:7\r\n  http://localhost:9001/jspm_packages/es6-module-loader.js:7\r\n  http://localhost:9001/jspm_packages/es6-module-loader.js:7\r\n````\r\n\r\nmy application:\r\n\r\n````\r\nCONSOLE: Potentially unhandled rejection [2] ReferenceError: Can't find variable: Map\r\n    at http://127.0.0.1:8380/web-admin/:22\r\n    at p (http://127.0.0.1:8380/web-admin/jspm_packages/system.js:1)\r\n    at p (http://127.0.0.1:8380/web-admin/jspm_packages/system.js:1)\r\n    at p (http://127.0.0.1:8380/web-admin/jspm_packages/system.js:1)\r\n    at p (http://127.0.0.1:8380/web-admin/jspm_packages/system.js:1)\r\n    at p (http://127.0.0.1:8380/web-admin/jspm_packages/system.js:1)\r\n    at p (http://127.0.0.1:8380/web-admin/jspm_packages/system.js:1)\r\n    at p (http://127.0.0.1:8380/web-admin/jspm_packages/system.js:1)\r\n    at http://127.0.0.1:8380/web-admin/jspm_packages/system.js:1\r\n    at o (http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7)\r\n    at p (http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7)\r\n    at j (http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7)\r\n    at k (http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7)\r\n    at http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7\r\n    at O (http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7)\r\n    at K (http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7)\r\n    at http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7\r\n    at http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7\r\n    at http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7\r\n    at http://127.0.0.1:8380/web-admin/jspm_packages/es6-module-loader.js:7 (from line #undefined in \"undefined\")\r\n````\r\nFWIW these both work fine in Chrome/FF and I'm running PhantomJS 1.9.8 on OS X 10.10\r\n\r\nAlso here's the phantom script I am using to test these and output from the console:\r\n````\r\nvar webPage = require('webpage');\r\nvar page = webPage.create();\r\n\r\npage.open('http://localhost:9001/', function() {\r\n  page.onConsoleMessage = function(msg, lineNum, sourceId) {\r\n    console.log('CONSOLE: ' + msg + ' (from line #' + lineNum + ' in \"' + sourceId + '\")');\r\n  };\r\n});\r\n````\r\n\r\nI've made some instructions to replicate the first set of errors:\r\n````\r\ngit clone git@github.com:aurelia/app-contacts.git\r\ncd app-contacts\r\nnpm install && jspm install\r\ngulp watch\r\n````\r\nThis assumes you have `node`, `jspm` and `gulp` installed. Then you can run the above phantomjs script."},"comment":{"url":"https://api.github.com/repos/systemjs/systemjs/issues/comments/99807935","html_url":"https://github.com/systemjs/systemjs/issues/440#issuecomment-99807935","issue_url":"https://api.github.com/repos/systemjs/systemjs/issues/440","id":99807935,"user":{"login":"guybedford","id":598730,"avatar_url":"https://avatars.githubusercontent.com/u/598730?v=3","gravatar_id":"","url":"https://api.github.com/users/guybedford","html_url":"https://github.com/guybedford","followers_url":"https://api.github.com/users/guybedford/followers","following_url":"https://api.github.com/users/guybedford/following{/other_user}","gists_url":"https://api.github.com/users/guybedford/gists{/gist_id}","starred_url":"https://api.github.com/users/guybedford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guybedford/subscriptions","organizations_url":"https://api.github.com/users/guybedford/orgs","repos_url":"https://api.github.com/users/guybedford/repos","events_url":"https://api.github.com/users/guybedford/events{/privacy}","received_events_url":"https://api.github.com/users/guybedford/received_events","type":"User","site_admin":false},"created_at":"2015-05-07T10:33:02Z","updated_at":"2015-05-07T10:33:02Z","body":"It may be advisable to use the unminified versions of SystemJS / ES6 Module Loader for debugging here.\r\n\r\nThen can you confirm if you're able to have SystemJS load, or run a simple test script? It may be worth starting small instead of trying to load your whole app."}}