$ tns debug android --emulator ... JS: [Vue warn]: Error in created hook: "ReferenceError: document is not defined" JS: JS: found in JS: JS: ---> <App> at components/App.vue JS: <Frame> JS: <Root> JS: 'firebase.init success' System.err: An uncaught Exception occurred on "main" thread. System.err: Unable to start activity ComponentInfo{com.example/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed System.err: ReferenceError: document is not defined System.err: System.err: StackTrace: System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: Calling js method onCreate failed System.err: ReferenceError: document is not defined System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817) System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0) System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) System.err: at android.os.Handler.dispatchMessage(Handler.java:105) System.err: at android.os.Looper.loop(Looper.java:164) System.err: at android.app.ActivityThread.main(ActivityThread.java:6541) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) System.err: Caused by: com.tns.NativeScriptException: Calling js method onCreate failed System.err: ReferenceError: document is not defined System.err: at com.tns.Runtime.callJSMethodNative(Native Method) System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1242) System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:1122) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1109) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1089) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:1081) System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:19) System.err: at android.app.Activity.performCreate(Activity.java:6975) System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213) System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770) System.err: ... 9 more