toy21@163.com
toy21@163.com
  • 发布:2019-04-02 00:54
  • 更新:2019-04-14 11:09
  • 阅读:914

HBuilderX 升级1.8.2。20190401后编译微信小程序后,在微信开发工具报错

分类:uni-app

HBuilderX 升级1.8.2。20190401,新建一个空项目,
<script>
export default {
data() {
return {
title: 'uniapp',
}
},
onLoad(){

    },  
    methods: {  

    }  
}  

</script>

编译后,运行到微信小程序开发者工 具,开发工 具提示报错。onLoad方法也没有执行,运行到chrom下没问题
微信小程序开发者工 具报错如下
VM1062:1 thirdScriptError
Cannot read property '$mp' of undefined;at "pages/index/index" page lifeCycleMethod onLoad function
TypeError: Cannot read property '$mp' of undefined
at r.onLoad (http://127.0.0.1:35818/appservice/common/vendor.js:712:21)
at r.<anonymous> (http://127.0.0.1:35818/appservice/dev/WAService.js:18:24831)
at D (http://127.0.0.1:35818/appservice/dev/WAService.js:18:1254)
at q (http://127.0.0.1:35818/appservice/dev/WAService.js:18:3173)
at K (http://127.0.0.1:35818/appservice/dev/WAService.js:18:3439)
at Function.<anonymous> (http://127.0.0.1:35818/appservice/dev/WAService.js:18:6274)
at http://127.0.0.1:35818/appservice/dev/WAService.js:18:12486
at http://127.0.0.1:35818/appservice/dev/WAService.js:5:22695
at Array.forEach (<anonymous>)
at Function.<anonymous> (http://127.0.0.1:35818/appservice/dev/WAService.js:5:22675)
console.error @ VM1062:1
errorReport @ WAService.js:3
thirdErrorReport @ WAService.js:3
(anonymous) @ WAService.js:3
(anonymous) @ WAService.js:18
D @ WAService.js:18
q @ WAService.js:18
K @ WAService.js:18
(anonymous) @ WAService.js:18
(anonymous) @ WAService.js:18
(anonymous) @ WAService.js:5
(anonymous) @ WAService.js:5
(anonymous) @ WAService.js:4
e @ appservice?t=1554137345909:1095
n.registerCallback.t @ appservice?t=1554137345909:1095
l.forEach.t @ appservice?t=1554137345909:1095
(anonymous) @ appservice?t=1554137345909:1095
s.onmessage @ appservice?t=1554137345909:1095
VM1062:1 thirdScriptError
Cannot read property 'call_hook' of undefined;at "pages/index/index" page lifeCycleMethod onShow function
TypeError: Cannot read property '__call_hook' of undefined
at r.mpOptions.(anonymous function) [as onShow] (http://127.0.0.1:35818/appservice/common/vendor.js:412:26)
at r.<anonymous> (http://127.0.0.1:35818/appservice/
dev/WAService.js:18:24831)
at D (http://127.0.0.1:35818/appservice/
dev/WAService.js:18:1266)
at q (http://127.0.0.1:35818/appservice/
dev/WAService.js:18:3173)
at K (http://127.0.0.1:35818/appservice/
dev/WAService.js:18:3439)
at Function.<anonymous> (http://127.0.0.1:35818/appservice/
dev/WAService.js:18:6274)
at http://127.0.0.1:35818/appservice/
dev/WAService.js:18:12486
at http://127.0.0.1:35818/appservice/
dev/WAService.js:5:22695
at Array.forEach (<anonymous>)
at Function.<anonymous> (http://127.0.0.1:35818/appservice/
dev__/WAService.js:5:22675)

2019-04-02 00:54 分享
已邀请:
我能行

我能行

微信开发者工具--设置--项目设置--调试基础库,选新版本库

591694604@qq.com

591694604@qq.com

我也遇到这个问题5555

我能行

我能行

同病相怜,还未解决,顶起,期待大神

2314980309@qq.com

2314980309@qq.com

同遇到这个问题,GitHub提了issue,官方没人管。。请问您解决了吗?

591694604@qq.com

591694604@qq.com

我降级了HBuilderX 1.8.1 就可以了

要回复问题请先登录注册