我爱吃苹果
我爱吃苹果
  • 发布:2018-11-28 21:36
  • 更新:2018-11-29 12:15
  • 阅读:1406

感觉是一个bug ,hbuilder:

分类:uni-app

感觉是一个bug ,hbuilder:

版本号:20181126

我在我实际项目也是这样,然后我就用新建模板测试了以下:同样如此。
新建一个空模板,然后pages.json
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "uni-app"
}
}
],

index为index.nvue,里面内容为example的nvue示例。copy过来。

然后运行:

29:46.675 Uncaught TypeError: $gwx is not a function at app-service.js:16 21:29:46.695 Wed Nov 28 2018 21:29:46 GMT 0800 (CST) Page route 错误
21:29:46.714 Page[pages/index/index] not found. May be caused by: 1. Forgot to add page route in pages.json. 2. Invoking Page() in async task.
21:29:46.734 console.groupEnd
21:29:47.695 TypeError: $gwx is not a function
21:29:47.715 29:47.338 14304 14304 I console : at file:///storage/emulated/0/Android/data/io.dcloud.HBuilder/apps/HBuilder/www/app-view.js:115:27 at uniapp://ready:196

我的实际项目中,本地可以展示出来,但是打包以后一片空白
demo没有打包测试

2018-11-28 21:36 负责人:无 分享
已邀请:
Trust

Trust - 少说废话

上传下有问题的项目demo

目前项目里面如果只有一个页面,并且页面是 .nvue 的话,会存在问题。
解决方案:
新建一个额外的页面,入口需要是 .vue 后缀的。

  • iMaldway

    我没用到nvue页面也报错

    2019-02-10 13:56

我爱吃苹果

我爱吃苹果 (作者)

已上传

我爱吃苹果

我爱吃苹果 (作者)

看到没

该问题目前已经被锁定, 无法添加新回复