Q:

How to execute ng-xi18n without TypeError: Cannot read property 'create' of undefined?

I want to make use of the internationalization (i18n) of Angular 2 in my Ionic 2 project. Unfortunatly I can't create a translation source file with the ng-xi18n tool trying following command:
./node_modules/.bin/ng-xi18n

Following TypeError appears:
TypeError: Cannot read property 'create' of undefined
    at Function.Extractor.create (/Users/user/Development/app/node_modules/@angular/compiler-cli/src/extractor.js:69:45)
    at extract (/Users/user/Development/app/node_modules/@angular/compiler-cli/src/extract_i18n.js:7:34)
    at Object.main (/Users/user/Development/app/node_modules/@angular/tsc-wrapped/src/main.js:47:16)
    at Object.<anonymous> (/Users/user/Development/app/node_modules/@angular/compiler-cli/src/extract_i18n.js:14:9)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.runMain (module.js:604:10)
Extraction failed

I tried an upgrade of my packages without success. Here my dependencies in the file package.json
"dependencies": {
    "@angular/common": "2.0.0-rc.4",
    "@angular/compiler": "2.0.0-rc.4",
    "@angular/compiler-cli": "^2.4.0",
    "@angular/core": "2.0.0-rc.4",
    "@angular/forms": "0.2.0",
    "@angular/http": "2.0.0-rc.4",
    "@angular/platform-browser": "2.0.0-rc.4",
    "@angular/platform-browser-dynamic": "2.0.0-rc.4",
    "@angular/platform-server": "^2.4.0",
    "es6-shim": "0.35.1",
    "ionic-angular": "2.0.0-beta.11",
    "ionic-native": "1.3.10",
    "ionicons": "3.0.0",
    "reflect-metadata": "0.1.8",
    "rxjs": "5.0.0-beta.6",
    "typescript": "^2.1.4",
    "zone.js": "0.6.12"
},

Maybe someone has solved this issue in the past. Thanks for answers in advanced. 

A:

According to Angular.io, you simply need to specify a translation format (do not rely on defaults).
For example:  
./node_modules/.bin/ng-xi18n --i18nFormat xlf

You should get a message.xlf file.

A:

To answer my own question: It was an issue with the dependencies. Rewriting the package.json solves this.
"dependencies": {
  "@angular/common": "2.2.1",
  "@angular/compiler": "2.2.1",
  "@angular/compiler-cli": "2.2.1",
  "@angular/core": "2.2.1",
  "@angular/forms": "2.2.1",
  "@angular/http": "2.2.1",
  "@angular/platform-browser": "2.2.1",
  "@angular/platform-browser-dynamic": "2.2.1",
  "@angular/platform-server": "2.2.1",
  "ionic-angular": "^2.0.0-rc.4",
  "ionic-native": "^2.2.12",
  "ionicons": "^3.0.0",
  "rxjs": "5.0.0-beta.12",
  "typescript": "^2.1.4",
  "zone.js": "^0.6.21"
},

Maybe only a solution for short time, until the next error appears.

