Can't start Android app after updating to beta.4

It turns out that the error is caused by the type annotations in the code, I filed an issue, although I’m not sure if that is supported in the Ionic 2 JS projects at all (because I’m using TypeScript):

To fix it you could remove the type annotations and the issue should disappear.

If you want to use the type annotations the workaround is to update your gulpfile.js:

// Change: `buildBrowserify({ watch: true }).on('end', done);` to:
buildBrowserify({
  babelifyOptions: {
    plugins: [
      'transform-decorators-legacy',
      'transform-class-properties',
      'transform-flow-strip-types'
    ]
  },
  watch: true
}).on('end', done);

and install some additional npm packages:

npm install babel-plugin-transform-class-properties --save
npm install babel-plugin-transform-flow-strip-types --save
1 Like