Search code examples
teleriknativescriptangular2-nativescriptnativescript-telerik-ui

NativeScript Telerik UI RC6


After Angular RC6 upgrade I can't get the application running (builds fine). It seems the culprit is nativescript-telerik-ui library. Throws following error:

java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: 
Error calling module function 

SyntaxError: Unexpected token export
File: "<unknown>, line: 1, column: 265

StackTrace: 
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'/data/data/appname/files/app/tns_modules/nativescript-telerik-ui/sidedrawer/angular/side-drawer-directives.js', line: 5, column: 12
    Frame: function:'require', file:'', line: 1, column: 266
    Frame: function:'', file:'/data/data/appname/files/app/mainModule.js', line: 10, column: 17
    Frame: function:'require', file:'', line: 1, column: 266


    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4802)

    ...

Error calling module function 

The first error is this line:

var di_1 = require('@angular/core/src/di');

The second one is:

var angular_1 = require('nativescript-telerik-ui/sidedrawer/angular');

It worked fine with RC5.

nativescript-telerik-ui version 0.3.1

tns version 2.2.1


Solution

  • Developer from the nativescript-telerik-ui team here. The current 1.3.1 version of nativescript-telerik-ui/nativescript-telerik-ui-pro was developed while the RC4 version of Angular 2 was the latest version, which is why that version of the ui plugin is compatible the RC4 version of Angular 2.

    We are actively following the developments of the Angular 2 framework and the RC6 compatibility is being developed as we speak. You can follow our nativescript-ui-samples-angular sdk repository for future updates on anything Angular 2 related.