I'm trying to create an app using Nativescript Sidekick using angular/typescript.
When I try and preview the app on my android devices it only shows the errors below.
I have tried running the preview several times on multiple android devices.
As soon as I make changes to the app.component.ts file the nativescript preview app begins showing the below list of errors
This snippet works
import { Component } from "@angular/core";
@Component({
moduleId: module.id,
selector: "ns-app",
templateUrl: "app.component.html"
})
export class AppComponent { }
This snippet does not
import { Component } from "@angular/core";
@Component({
selector: "gr-login",
moduleId: module.id,
templateUrl: "./login/login.component.html"
})
export class AppComponent {}
LOG from device Marvin: Angular is running in the development mode. Call >enableProdMode() to enable the production mode. LOG from device Marvin: HMR: Checking for updates to the bundle with hmr >hash 4a9d4dd775f015fffecd. LOG from device Marvin: Angular is running in the development mode. Call >enableProdMode() to enable the production mode. LOG from device Marvin: HMR: ↻ ./app/app.module.ts LOG from device Marvin: HMR: Successfully applied update with hmr hash 4a9d4dd775f015fffecd. App is up to date. LOG from device Marvin: HMR: ↻ ./app/app.component.ts LOG from device Marvin: HMR: The following modules were updated: LOG from device Marvin: HMR: Checking for updates to the bundle with hmr hash c892cbd39be51a20e8ba. LOG from device Marvin: HMR: The following modules were updated: LOG from device Marvin: HMR: ↻ ./app/app.component.ts LOG from device Marvin: HMR: ↻ ./app/app.component.html LOG from device Marvin: HMR: ↻ ./app/login/login.component.html LOG from device Marvin: HMR: ↻ ./app/app.module.ts LOG from device Marvin: HMR: Successfully applied update with hmr hash c892cbd39be51a20e8ba. App is up to date. LOG from device Marvin: Angular is running in the development mode. Call enableProdMode() to enable the production mode. LOG from device Marvin: An uncaught Exception occurred on "main" thread. Calling js method run failed Error: Failed to create View with entry.create() function. StackTrace: Frame: function:'ZoneAwareError', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 1298, column: 31 Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 45, column: 13 Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 985, column: 32 Frame: function:'ActivityCallbacksImplementation.resetActivityContent', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 946, column: 10 Frame: function:'_resetRootView', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/application/application.js', line: 125, column: 13 Frame: function:'NativeScriptPlatformRef._livesync', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/platform-common.js', line: 268, column: 19 Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/platform-common.js', line: 97, column: 80 Frame: function:'ZoneDelegate.invokeTask', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 421, column: 23 Frame: function:'Zone.runTask', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 188, column: 39 Frame: function:'ZoneTask.invokeTask', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 496, column: 28 Frame: function:'ZoneTask.invoke', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 485, column: 40 Frame: function:'timer', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 1561, column: 23 Frame: function:'invoke', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/timer/timer.js', line: 19, column: 45 Frame: function:'ZoneDelegate.invoke', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 388, column: 18 Frame: function:'Zone.runGuarded', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 151, column: 39 Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 129, column: 23 Frame: function:'run', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/timer/timer.js', line: 23, column: 7 at com.tns.Runtime.callJSMethodNative(Native Method) at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242) at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122) at com.tns.Runtime.callJSMethod(Runtime.java:1109) at com.tns.Runtime.callJSMethod(Runtime.java:1089) at com.tns.Runtime.callJSMethod(Runtime.java:1081) at com.tns.gen.java.lang.Runnable.run(Runnable.java:17) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6863) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) LOG from device Marvin: Angular is running in the development mode. Call enableProdMode() to enable the production mode. LOG from device Marvin: HMR: Checking for updates to the bundle with hmr hash c0e7af62393125eaf0d7. LOG from device Marvin: HMR: ↻ ./app/login/login.component.html LOG from device Marvin: HMR: Successfully applied update with hmr hash c0e7af62393125eaf0d7. App is up to date. LOG from device Marvin: Angular is running in the development mode. Call enableProdMode() to enable the production mode. LOG from device Marvin: HMR: ↻ ./app/app.component.html LOG from device Marvin: HMR: ↻ ./app/app.module.ts LOG from device Marvin: HMR: The following modules were updated: LOG from device Marvin: HMR: ↻ ./app/app.component.ts LOG from device Marvin: An uncaught Exception occurred on "main" thread. Calling js method run failed Error: Failed to create View with entry.create() function.
StackTrace: Frame: function:'ZoneAwareError', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js',
line: 1298, column: 31 Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/builder/builder.js', line: 45, column: 13 Frame: function:'ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 985, column: 32 Frame: function:'ActivityCallbacksImplementation.resetActivityContent', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/ui/frame/frame.js', line: 946, column: 10 Frame: function:'_resetRootView', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/application/application.js', line: 125, column: 13 Frame: function:'NativeScriptPlatformRef._livesync', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/platform-common.js', line: 268, column: 19 Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/platform-common.js', line: 97, column: 80 Frame: function:'ZoneDelegate.invokeTask', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 421, column: 23 Frame: function:'Zone.runTask', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 188, column: 39 Frame: function:'ZoneTask.invokeTask', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 496, column: 28 Frame: function:'ZoneTask.invoke', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 485, column: 40 Frame: function:'timer', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 1561, column: 23 Frame: function:'invoke', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/timer/timer.js', line: 19, column: 45 Frame: function:'ZoneDelegate.invoke', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 388, column: 18 Frame: function:'Zone.runGuarded', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 151, column: 39 Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js', line: 129, column: 23 Frame: function:'run', file:'file:///data/data/org.nativescript.preview/files/app/tns_modules/tns-core-modules/timer/timer.js', line: 23, column: 7 at com.tns.Runtime.callJSMethodNative(Native Method) at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242) at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122) at com.tns.Runtime.callJSMethod(Runtime.java:1109) at com.tns.Runtime.callJSMethod(Runtime.java:1089) at com.tns.Runtime.callJSMethod(Runtime.java:1081) at com.tns.gen.java.lang.Runnable.run(Runnable.java:17) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6863) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) LOG from device Marvin: Angular is running in the development mode. Call enableProdMode() to enable the production mode. LOG from device Marvin: An uncaught Exception occurred on "main" thread. Unable to start activity ComponentInfo{org.nativescript.preview/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed Error: Main entry is missing. App cannot be started. Verify app bootstrap.
StackTrace: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.preview/com.tns.NativeScriptActivity}:
com.tns.NativeScriptException: Calling js method onCreate failed Error: Main entry is missing. App cannot be started. Verify app bootstrap. at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3037) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3172) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1906) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6863) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) Caused by: com.tns.NativeScriptException: Calling js method onCreate failed Error: Main entry is missing. App cannot be started. Verify app bootstrap. at com.tns.Runtime.callJSMethodNative(Native Method) at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242) at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122) at com.tns.Runtime.callJSMethod(Runtime.java:1109) at com.tns.Runtime.callJSMethod(Runtime.java:1089) at com.tns.Runtime.callJSMethod(Runtime.java:1081) at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:20) at android.app.Activity.performCreate(Activity.java:7149) at android.app.Activity.performCreate(Activity.java:7140) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1288) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3017) ... 11 more