{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/6917","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/6917/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/6917/comments","events_url":"https://api.github.com/repos/angular/angular/issues/6917/events","html_url":"https://github.com/angular/angular/issues/6917","id":131687518,"number":6917,"title":"Karma PhantomJS fails when importing NG2 modules in spec files","user":{"login":"OClement","id":814862,"avatar_url":"https://avatars.githubusercontent.com/u/814862?v=3","gravatar_id":"","url":"https://api.github.com/users/OClement","html_url":"https://github.com/OClement","followers_url":"https://api.github.com/users/OClement/followers","following_url":"https://api.github.com/users/OClement/following{/other_user}","gists_url":"https://api.github.com/users/OClement/gists{/gist_id}","starred_url":"https://api.github.com/users/OClement/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OClement/subscriptions","organizations_url":"https://api.github.com/users/OClement/orgs","repos_url":"https://api.github.com/users/OClement/repos","events_url":"https://api.github.com/users/OClement/events{/privacy}","received_events_url":"https://api.github.com/users/OClement/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-02-05T16:27:29Z","updated_at":"2016-04-05T00:28:14Z","closed_at":null,"body":"So I thought it was a SystemJS related issue but it turns out it looks more like an NG2 one, or at least some combination of NG2, SystemJs and PhantomJS.\r\n\r\n[Original Issue I opened at SystemJS](https://github.com/systemjs/systemjs/issues/1081)\r\n---\r\n\r\n---\r\n\r\nLong story short:\r\nI can run tests fin through Karma and Chrome, but as soon as I switch to PhantomJs it fails\r\nIf my Spec files doesn't import anything related to Angular2, it works fine, but if for instance I `import \r\n{it} from 'angular2/testing'` or `import {Component} from 'angular2/core`, it will fail with no error message;\r\nI only get __[this stack trace](http://pastebin.com/UYiY1Z0S)__\r\n\r\nIf my spec file import a module from my application that in turns import something from NG2, it fails in the same way. But importing for example `{Observable} from 'rxjs/Observable'` it works fine\r\n\r\nYou can see details of my configuration in the original issue lined above\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/205558111","html_url":"https://github.com/angular/angular/issues/6917#issuecomment-205558111","issue_url":"https://api.github.com/repos/angular/angular/issues/6917","id":205558111,"user":{"login":"DrewynV","id":15723416,"avatar_url":"https://avatars.githubusercontent.com/u/15723416?v=3","gravatar_id":"","url":"https://api.github.com/users/DrewynV","html_url":"https://github.com/DrewynV","followers_url":"https://api.github.com/users/DrewynV/followers","following_url":"https://api.github.com/users/DrewynV/following{/other_user}","gists_url":"https://api.github.com/users/DrewynV/gists{/gist_id}","starred_url":"https://api.github.com/users/DrewynV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DrewynV/subscriptions","organizations_url":"https://api.github.com/users/DrewynV/orgs","repos_url":"https://api.github.com/users/DrewynV/repos","events_url":"https://api.github.com/users/DrewynV/events{/privacy}","received_events_url":"https://api.github.com/users/DrewynV/received_events","type":"User","site_admin":false},"created_at":"2016-04-05T00:28:14Z","updated_at":"2016-04-05T00:28:14Z","body":"__________________________________\n\nHi! We just wanted to let you know we receievd your email. Thank you for submitting your request. Our aim is to get back to you within 24 hours at the latest. If you have any additional information to add to your request, please reply to this email.\n\n\nAlso please visit our knowledgebase (http://www.support.magicdust.com.au) to browse for further info, we are adding to it all the time.\n\nOr here is our industry report about the 11 Essentials for a Successful Website (http://www.magicdust.com.au/web-design/.\n\nWe look forward to helping you succeed online.\n\nThanks\n\nThe Team @ Magicdust Digital\n\nhttp://support.magicdust.com.au/\n\nPh (02) 9979 7474\nM-F | 9 am-5:00 pm AEST (AEDT in Summer) excluding Public Holidays\n\n------------------------------------------------------------------------------------------------------------\nThis message was sent to  reply@reply.github.com in reference to Case #166461.\n------------------------------------------------------------------------------------------------------------\n\n\n[[e4da5b2e8b203e9c2a20a514347a6eb61e0e32e1-673073416]]"}}