Nativescript: Getting errors after 2.4 update

Created on 17 Nov 2016  路  5Comments  路  Source: NativeScript/NativeScript

Hi! Super excited of the new 2.4.
I followed the upgrade instructions here:
https://docs.nativescript.org/angular/releases/upgrade-instructions.html

But now I'm getting this error after the loading screen of the app.

An uncaught Exception occurred on "main" thread.
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException:

Error calling module function

Error calling module function

Error calling module function

Error calling module function

Error: com.tns.NativeScriptException: Failed to find module: "rxjs/Subject", relative to: app/tns_modules/
com.tns.Module.resolvePathHelper(Module.java:159)
com.tns.Module.resolvePath(Module.java:60)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:514)
com.tns.Runtime.run(Runtime.java:509)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1026)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5064)
android.app.ActivityThread.access$1600(ActivityThread.java:150)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1459)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:168)
android.app.ActivityThread.main(ActivityThread.java:5845)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
File: ", line: 1, column: 265

StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'globalScope', file:'/data/data/org.nativescript.app/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 7, column: 85
Frame: function:'', file:'/data/data/org.nativescript.app/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 10, column: 2
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'TextAst.TextAst.sourceSpan.value', file:'/data/data/org.nativescript.app/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 7, column: 83
Frame: function:'', file:'/data/data/org.nativescript.app/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10, column: 2
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'/data/data/org.nativescript.app/files/app/tns_modules/nativescript-angular/platform.js', line: 6, column: 18
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'/data/data/org.nativescript.app/files/app/main.js', line: 3, column: 18
Frame: function:'require', file:'', line: 1, column: 266

Error: com.tns.NativeScriptException: Failed to find module: "rxjs/Subject", relative to: app/tns_modules/
com.tns.Module.resolvePathHelper(Module.java:159)
com.tns.Module.resolvePath(Module.java:60)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:514)
com.tns.Runtime.run(Runtime.java:509)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1026)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5064)
android.app.ActivityThread.access$1600(ActivityThread.java:150)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1459)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:168)
android.app.ActivityThread.main(ActivityThread.java:5845)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
File: ", line: 1, column: 265

StackTrace:
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'globalScope', file:'/data/data/org.nativescript.app/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 7, column: 85
Frame: function:'', file:'/data/data/org.nativescript.app/files/app/tns_modules/@angular/core/bundles/core.umd.js', line: 10, column: 2
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'TextAst.TextAst.sourceSpan.value', file:'/data/data/org.nativescript.app/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 7, column: 83
Frame: function:'', file:'/data/data/org.nativescript.app/files/app/tns_modules/@angular/compiler/bundles/compiler.umd.js', line: 10, column: 2
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'/data/data/org.nativescript.app/files/app/tns_modules/nativescript-angular/platform.js', line: 6, column: 18
Frame: function:'require', file:'', line: 1, column: 266
Frame: function:'', file:'/data/data/org.nativescript.app/files/app/main.js', line: 3, column: 18
Frame: function:'require', file:'', line: 1, column: 266

Error: com.tns.NativeScriptException: Failed to find module: "rxjs/Subject", relative to: app/tns_modules/
com.tns.Module.resolvePathHelper(Module.java:159)
com.tns.Module.resolvePath(Module.java:60)
com.tns.Runtime.runModule(Native Method)
com.tns.Runtime.runModule(Runtime.java:514)
com.tns.Runtime.run(Runtime.java:509)
com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:17)
android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1026)
android.app.ActivityThread.handleBindApplication(ActivityThread.java:5064)
android.app.ActivityThread.access$1600(ActivityThread.java:150)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1459)
android.os.Handler.dispatchMessage(Handler.java:102)
android.os.Looper.loop(Looper.java:168)
android.app.ActivityThread.main(ActivityThread.java:5845)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:687)
File: ", line: 1, column: 265

question

Most helpful comment

@NickIliev i had a similar problem and after installing rxjs everything work 馃憤

All 5 comments

Hi @9thwall,
Thank you for your interest in NativeScript.

Could you try to delete node_modules, platforms, hooks folders and to clean npm cache using npm cache clear. then try to rebuild your project using tns run <platform_name>. If this does not help, could you share with us your package.json file. It would also help if you could build your project using tns run android --log trace and to send us the log from the console.

Hope this will help

Hey @9thwall

Perhaps, you are missing a dependency for rxjs in your package.json.
You can use this link as a reference.

@NickIliev i had a similar problem and after installing rxjs everything work 馃憤

Thank you all for the help and sorry about the delay on response.
Rxjs was the issue and it's working now. So happy!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings