I generate an application as suggested by https://github.com/nativescript-vue/vue-cli-template:
vue init nativescript-vue/vue-cli-template test03
cd test03
npm install
tns build android
tns preview
At preview stage, I get the following error:
LOG from device HUAWEI P10 lite: com.tns.NativeScriptException: Error calling module function
TypeError: Cannot read property 'on' of undefined
File: "file:///data/data/org.nativescript.preview/files/app/vendor.js, line: 3254, column: 2085
StackTrace:
Frame: function:'srcBackendJs', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 3254, column: 2086
Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 12, column: 27
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 27, column: 16
Frame: function:'../node_modules/@vue/devtools/build/backend.js', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 27, column: 88
Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 751, column: 30
Frame: function:'fn', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 121, column: 20
Frame: function:'connect', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 6334, column: 5
Frame: function:'setupDevtools', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 7417, column: 16
Frame: function:'Vue.$start', file:'file:///data/data/org.nativescript.preview/files/app/vendor.js', line: 7441, column: 7
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 329, column: 4
Frame: function:'./main.ts', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 335, column: 30
Frame: function:'__webpack_require__', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 751, column: 30
Frame: function:'checkDeferredModules', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 44, column: 23
Frame: function:'webpackJsonpCallback', file:'file:///data/data/org.nativescript.preview/files/app/runtime.js', line: 31, column: 19
Frame: function:'', file:'file:///data/data/org.nativescript.preview/files/app/bundle.js', line: 2, column: 57
Frame: function:'require', file:'', line: 1, column: 266
TypeError: Cannot read property 'on' of undefined
at com.tns.Runtime.runModule(Native Method)
at com.tns.Runtime.runModule(Runtime.java:663)
at com.tns.Runtime.run(Runtime.java:655)
at com.tns.NativeScriptApplication.onCreate(NativeScriptApplication.java:21)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1122)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6619)
at android.app.ActivityThread.-wrap2(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:108)
at android.os.Looper.loop(Looper.java:166)
at android.app.ActivityThread.main(ActivityThread.java:7529)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
I ran on Windows 10 and phone is Android Huawei.
vue --version
3.11.0
I tried with both Javascript and TypeScript, vuex both yes and no, and scheme none and light. None work.