angular: "TypeError: Cannot read property 'kind' of undefined" when executing ng-xi18n

I’m submitting a … (check one with “x”)

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior When I execute ng-xi18n, I get the following:

TypeError: Cannot read property ‘kind’ of undefined at maybeGetSimpleFunction (C:\SL\src\Clientnode_modules@angular\tsc-wrapped\src\collector.js:34:41) at C:\SL\src\Clientnode_modules@angular\tsc-wrapped\src\collector.js:242:41 at visitEachNode (C:\SL\src\Clientnode_modules\typescript\lib\typescript.js:8247:30) at Object.forEachChild (C:\SL\src\Clientnode_modules\typescript\lib\typescript.js:8407:24) at MetadataCollector.getMetadata (C:\SL\src\Clientnode_modules@angular\tsc-wrapped\src\collector.js:204:12) at ReflectorHost.getMetadataFor (C:\SL\src\Clientnode_modules@angular\compiler-cli\src\reflector_host.js:224:43) at StaticReflector.getModuleMetadata (C:\SL\src\Clientnode_modules@angular\compiler-cli\src\static_reflector.js:484:40) at Extractor.readFileMetadata (C:\SL\src\Clientnode_modules@angular\compiler-cli\src\extract_i18n.js:50:51) at C:\SL\src\Clientnode_modules@angular\compiler-cli\src\extract_i18n.js:87:74 at Array.map (native) Extraction failed

Expected behavior At least a better error message, or an actual xlif output.

Reproduction of the problem I do not have a simple repro. At least understanding what the problem could be would help.

What is the motivation / use case for changing the behavior?

Please tell us about your environment: Windows.

  • Angular version: 2.0.0
  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ] n/a
  • Language: [all | TypeScript X.X | ES6/7 | ES5] n/a
  • Node (for AoT issues): node --version =
    n/a

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Reactions: 4
  • Comments: 20 (3 by maintainers)

Commits related to this issue

Most upvoted comments

I’m getting the same typescript error when running the AoT compiler. The typescript compiler compiles fine so I have no idea where to start looking to fix this.

I think my problem may be due to using default exports. http://stackoverflow.com/questions/39190493/get-cannot-read-property-type-of-null-using-angular2-aot-ngc-compiler-with-r I’m recoding to name all my exports. Hope this helps.