gpt4 book ai didi

nativescript-vue tns 生成的应用程序获取 TypeError : Cannot read property 'on' of undefined

转载 作者:行者123 更新时间:2023-12-04 05:06:24 25 4
gpt4 key购买 nike

我按照 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

在预览阶段,我收到以下错误:
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)

我在 Windows 10 上运行,手机是 Android 华为。
vue --version
3.11.0

我尝试了 Javascript 和 TypeScript,vuex 是和否,scheme none 和 light。没有工作。

最佳答案

我收到了 Igor 关于 Nativescript 社区松弛的回复。他提到我在生成应用程序时启用了 vue devtools 选项。

我在 vue devtools 上重新生成了一个应用程序选择否,一切正常。

关于nativescript-vue tns 生成的应用程序获取 TypeError : Cannot read property 'on' of undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57741898/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com