【发布时间】:2019-08-09 00:14:44
【问题描述】:
请告诉我我可以提供哪些信息来更好地帮助解决此问题。到目前为止,我一直在阅读 webpack,比较我的 webpack.config.js 文件,并随机搜索到 Google void。
今天早上早些时候,我正在按预期运行我的 NativeScript-vue 项目。做了一些更改,保存,测试,清洗,冲洗重复。然后我尝试构建并收到以下错误消息:
Unable to apply changes on device: emulator-####. Error is: Nativescript-vue doesn't work without --bundle option. Please specify --bundle option to the command and execute it again..
我一直在编辑一个 .vue 文件——我没有修改任何其他文件,尤其是配置文件。
是什么导致了这个问题?
我该如何解决这个问题?
有没有比粘贴错误消息更智能的搜索?
更新:
根据@Estradiaz 的要求
我一直在尝试通过以下方式运行应用程序:tns run android --bundle
(也尝试了ios 并得到了相同的结果)
我已经使用npm install 和tns install 构建了这个项目
我的 package.json 中唯一的脚本是:
"clean": "rm -rf node_modules/* && rm -rf hooks/* && rm -rf platforms/* && rm webpack.config.js && rm package-lock.json"
(只是在添加新资产时/在添加新资产时销毁所有内容)
运行 TNS 版本 #5.2.4
终端的输出是:
Webpack compilation complete. Watching for file changes.
Webpack build done!
Unable to apply changes on device: emulator-5554. Error is: Nativescript-vue doesn't work without --bundle option. Please specify --bundle option to the command and execute it again..
更新更新:
Estradiaz 掉落了一些伟大的知识;但是,当我的 nativescript-vue 包从 2.0.2 更新到 2.1.0 时,我发现我的错误来自 2.1.0
回滚到 2.0.2 解决了我的具体问题。其他开发者已经开始报告类似问题:https://github.com/nativescript-vue/nativescript-vue/issues/454 和 https://github.com/nativescript-vue/nativescript-vue/pull/361#issuecomment-474079850
【问题讨论】:
-
如何启动您的应用程序? Tns 还是 npm?你能发布脚本吗?
-
嗨 @Estradiaz 谢谢你回复我 :) 我已经更新了更多细节的问题——我希望这些是你想要的。
-
看起来不错 - 请问,以前从未这样做过,我现在懒得测试 - 只是一个想法 - 你只使用了原生组件?
-
据我所知,是的。 nativescript-{orientation、theme-core、ui-listview、ui-sidedrawer、vue}、tns-core-modules 和 vuex。这些都不是项目的新增内容;过去几天我一直在研究 UI 布局(我的假设是如果我破坏 UI,那么屏幕将不会显示,而不是构建逻辑会失败)
-
是的 - 但我认为当 tns 无法解释代码时会发生此错误 - imo 忘记 --bundle 或捆绑错误 - 我现在在手机中将构建一个稍后测试我是否可以重新创建
标签: vue.js webpack nativescript nativescript-vue nativescript-cli