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


#1

After updating nativescript form 3.3.0 to 3.4.1 this error is shown
deals are as follows
ActivityManager: Start proc 3572:org.nativescript.tradelivemobile/u0a80 for activity org.nativescript.tradelivemobile/com.tns.NativeScriptActivity
System.err: java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:
System.err: Error calling module function
System.err: Error calling module function
System.err: TypeError: Cannot assign to read only property ‘__extends’ of object ‘#‘
System.err: File: "file:///data/data/org.nativescript.tradelivemobile/files/app/app.module.js, line: 9, column: 17
System.err: StackTrace:
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/app.module.js’, line: 9, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/main.js’, line: 5, column: 22
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: TypeError: Cannot assign to read only property ‘__extends’ of object ‘#‘
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/app.module.js’, line: 9, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/main.js’, line: 5, column: 22
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: TypeError: Cannot assign to read only property ‘__extends’ of object ‘#‘
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/app.module.js’, line: 9, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/main.js’, line: 5, column: 22
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4710)
System.err: at android.app.ActivityThread.-wrap1(ActivityThread.java)
System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
System.err: at android.os.Handler.dispatchMessage(Handler.java:102)
System.err: at android.os.Looper.loop(Looper.java:148)
System.err: at android.app.ActivityThread.main(ActivityThread.java:5417)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
System.err: Caused by: com.tns.NativeScriptException:
System.err: Error calling module function
System.err: Error calling module function
System.err: TypeError: Cannot assign to read only property ‘__extends’ of object ‘#‘
System.err: File: "file:///data/data/org.nativescript.tradelivemobile/files/app/app.module.js, line: 9, column: 17
System.err: StackTrace:
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/app.module.js’, line: 9, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/main.js’, line: 5, column: 22
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: TypeError: Cannot assign to read only property ‘__extends’ of object ‘#‘
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/app.module.js’, line: 9, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/main.js’, line: 5, column: 22
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: TypeError: Cannot assign to read only property ‘__extends’ of object ‘#‘
System.err: File: ", line: 1, column: 265
System.err: StackTrace:
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/app.module.js’, line: 9, column: 18
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: Frame: function:’’, file:‘file:///data/data/org.nativescript.tradelivemobile/files/app/main.js’, line: 5, column: 22
System.err: Frame: function:‘require’, file:’’, line: 1, column: 266
System.err: at com.tns.Runtime.runModule(Native Method)
System.err: at com.tns.Runtime.runModule(Runtime.java:530)
System.err: at com.tns.Runtime.run(Runtime.java:522)
System.err: at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:19)
System.err: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
System.err: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
System.err: … 8 more
ActivityManager: Process org.nativescript.tradelivemobile (pid 3572) has died
15:22:51 - Compilation complete. Watching for file changes

my package.json is
{
“name”: “tradelive”,
“version”: “1.0.0”,
“description”: “NativeScript Application”,
“license”: “SEE LICENSE IN “,
“readme”: “NativeScript Application”,
“repository”: “”,
“nativescript”: {
“id”: “org.nativescript.tradelivemobile”,
“tns-android”: {
“version”: “3.4.1”
}
},
“scripts”: {
“tslint”: “tslint -p tsconfig.json”
},
“dependencies”: {
@angular/animations”: “~4.4.1”,
"@angular/common": “~4.4.1”,
"@angular/compiler": “~4.4.1”,
"@angular/core": “~4.4.1”,
"@angular/forms": “~4.4.1”,
"@angular/http": “~4.4.1”,
"@angular/platform-browser": “~4.4.1”,
"@angular/router": “~4.4.1”,
"@types/lodash": “^4.14.91”,
"@wwwalkerrun/nativescript-ngx-magic": “^2.0.4”,
“angular2-jwt”: “^0.2.3”,
“js-data”: “^3.0.1”,
“js-data-http”: “^3.0.0”,
“lodash”: “^4.17.4”,
“nativescript-angular”: “~4.4.1”,
“nativescript-badge-button”: “^0.1.2”,
“nativescript-barcodescanner”: “^2.7.4”,
“nativescript-bottombar”: “^3.0.7”,
“nativescript-checkbox”: “^3.0.3”,
“nativescript-exit”: “^1.0.1”,
“nativescript-feedback”: “^1.1.0”,
“nativescript-floatingactionbutton”: “^4.1.3”,
“nativescript-loading-indicator”: “^2.4.0”,
“nativescript-localstorage”: “^1.1.5”,
“nativescript-material-icons”: “^1.0.3”,
“nativescript-ng-shadow”: “^2.1.0”,
“nativescript-ng2-fonticon”: “^1.3.4”,
“nativescript-ngx-fonticon”: “^4.0.0”,
“nativescript-permissions”: “^1.2.3”,
“nativescript-pro-ui”: “^3.2.0”,
“nativescript-ripple”: “^2.0.0”,
“nativescript-snackbar”: “^2.0.0”,
“nativescript-theme-core”: “~1.0.2”,
“nativescript-toast”: “^1.4.6”,
“reflect-metadata”: “~0.1.8”,
“rxjs”: “~5.4.2”,
“tns-core-modules”: “^3.4.0”,
“zone.js”: “~0.8.2”
},
“devDependencies”: {
"@types/jasmine": “^2.8.2”,
“babel-traverse”: “6.26.0”,
“babel-types”: “6.26.0”,
“babylon”: “6.18.0”,
“codelyzer”: “^4.0.2”,
“lazy”: “1.0.11”,
“nativescript-dev-typescript”: “~0.5.0”,
“tslint”: “^5.8.0”,
“typescript”: “^2.4.2”
}
}

Also tsconfig file is
{
“compilerOptions”: {
“module”: “commonjs”,
“target”: “es6”,
“experimentalDecorators”: true,
“emitDecoratorMetadata”: true,
“noEmitHelpers”: true,
“noEmitOnError”: true,
“lib”: [
“es6”,
“dom”,
“es2015.iterable”
],
“baseUrl”: “.”,
“paths”: {
"": [
"./node_modules/tns-core-modules/
",
"./node_modules/"
]
}
},
“exclude”: [
“node_modules”,
“platforms”,
"**/
.aot.ts"
]
}


#2

@Muhammad_Tahir a little more information about your application will be necessary. What plugins and npm modules are using in the app? There appears to be one in particular that tries to override the global.__extends object that the NativeScript Android Runtime sets explicitly.


#3

their is some issue is my source code now i woks thanks for reply @Pete.K