{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular/issues/11076","repository_url":"https://api.github.com/repos/angular/angular","labels_url":"https://api.github.com/repos/angular/angular/issues/11076/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular/issues/11076/comments","events_url":"https://api.github.com/repos/angular/angular/issues/11076/events","html_url":"https://github.com/angular/angular/issues/11076","id":173244420,"number":11076,"title":"@angular/Core gives \"Uncaught TypeError: Cannot read property 'type' of null\"","user":{"login":"cortopy","id":8725825,"avatar_url":"https://avatars.githubusercontent.com/u/8725825?v=3","gravatar_id":"","url":"https://api.github.com/users/cortopy","html_url":"https://github.com/cortopy","followers_url":"https://api.github.com/users/cortopy/followers","following_url":"https://api.github.com/users/cortopy/following{/other_user}","gists_url":"https://api.github.com/users/cortopy/gists{/gist_id}","starred_url":"https://api.github.com/users/cortopy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cortopy/subscriptions","organizations_url":"https://api.github.com/users/cortopy/orgs","repos_url":"https://api.github.com/users/cortopy/repos","events_url":"https://api.github.com/users/cortopy/events{/privacy}","received_events_url":"https://api.github.com/users/cortopy/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular/angular/labels/hotlist:%20error%20messages","name":"hotlist: error messages","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-08-25T16:04:36Z","updated_at":"2016-08-26T12:22:13Z","closed_at":null,"body":"**I'm submitting a ...**  (check one with \"x\")\r\n```\r\n[ x] bug report => search github for a similar issue or PR before submitting\r\n[ ] feature request\r\n[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question\r\n```\r\n\r\n**Current behavior**\r\nWhen I install @angular/core in a npm linked package I get the error message:\r\n\r\n```\r\nUncaught TypeError: Cannot read property 'type' of null\r\n```\r\n\r\n**Expected/desired behavior**\r\nEither the error message is more specific or I should be able to install @angular/core without a problem\r\n\r\n**Reproduction of the problem**\r\nI'm afraid I can't replicate with plunkr as it's to do with an npm linked package.\r\n\r\nI've spent some hours getting to the cause of the problem and this is what I found:\r\n\r\n1. I have a ngModule in my web app\r\n2. It works great\r\n3. I decide to move this ngModule somewhere else in my computer so that I can use with other web apps\r\n4. I install it in my app with `npm link` (no single line of code has been edited)\r\n5. App doesn't work anymore. I get the error:\r\n```\r\nUncaught TypeError: Cannot read property 'type' of null\r\n\r\n(anonymous function)\t@\tmetadata_resolver.js:698\r\ngetTransitiveModules\t@\tmetadata_resolver.js:697\r\nCompileMetadataResolver._getTransitiveNgModuleMetadata\t@\tmetadata_resolver.js:411\r\nCompileMetadataResolver.getNgModuleMetadata\t@\tmetadata_resolver.js:283\r\nRuntimeCompiler._compileComponents\t@\truntime_compiler.js:150\r\nRuntimeCompiler._compileModuleAndComponents\t@\truntime_compiler.js:72\r\nRuntimeCompiler.compileModuleAsync\t@\truntime_compiler.js:49\r\nPlatformRef_._bootstrapModuleWithZone\t@\tapplication_ref.js:368\r\nPlatformRef_.bootstrapModule\t@\tapplication_ref.js:361\r\n(anonymous function)\t@\tmain.ts:4\r\n__webpack_require__\t@\tbootstrap 7768849…:586\r\nfn\t@\tbootstrap 7768849…:109\r\n(anonymous function)\t@\tmain.js:7\r\n__webpack_require__\t@\tbootstrap 7768849…:586\r\nwebpackJsonpCallback\t@\tbootstrap 7768849…:21\r\n(anonymous function)\t@\tmain.js:1\r\n```\r\n\r\nWith that stack trace I was expecting it would be something with webpack or typescript. However no errors are presented in the console.\r\nAfter A LOT of trial and error (I find this error message impossible to debug) I have found that I can remove `@angular/core` from my npm linked package and web app works again. The weird thing is that all the other @angular packages are installed in the package and they don't seem to cause conflict.\r\n\r\nRight now, what I've done is remove @angular/core from the npm linked package. At least that makes app to work again. However this gives Typescript errors as @angular/core nowhere to be found in the npm linked package.\r\n\r\n**What is the expected behavior?**\r\nNo conflict with @angular/core\r\n\r\n\r\n**What is the motivation / use case for changing the behavior?**\r\nBeing able to use ngModules as npm linked packages\r\n\r\n\r\n**Please tell us about your environment:**\r\n\r\n* **Angular version:** 2.0.0-rc.5\r\n \r\n* **Browser:** [ Chrome XX ] \r\n \r\n* **Language:** [ TypeScript 2] \r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular/issues/comments/242720935","html_url":"https://github.com/angular/angular/issues/11076#issuecomment-242720935","issue_url":"https://api.github.com/repos/angular/angular/issues/11076","id":242720935,"user":{"login":"Caballerog","id":8807391,"avatar_url":"https://avatars.githubusercontent.com/u/8807391?v=3","gravatar_id":"","url":"https://api.github.com/users/Caballerog","html_url":"https://github.com/Caballerog","followers_url":"https://api.github.com/users/Caballerog/followers","following_url":"https://api.github.com/users/Caballerog/following{/other_user}","gists_url":"https://api.github.com/users/Caballerog/gists{/gist_id}","starred_url":"https://api.github.com/users/Caballerog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caballerog/subscriptions","organizations_url":"https://api.github.com/users/Caballerog/orgs","repos_url":"https://api.github.com/users/Caballerog/repos","events_url":"https://api.github.com/users/Caballerog/events{/privacy}","received_events_url":"https://api.github.com/users/Caballerog/received_events","type":"User","site_admin":false},"created_at":"2016-08-26T12:22:13Z","updated_at":"2016-08-26T12:22:13Z","body":"I've the same problem that @cortopy."}}
{"actor":{"display_login":"Caballerog"}}