4***@qq.com
4***@qq.com
  • 发布:2023-01-30 22:11
  • 更新:2023-02-23 09:39
  • 阅读:4820

【报Bug】我使用uniapp创建的微信小程序在点击时报一个错误typeError: Cannot read property 'setValidInit' of undefined

分类:uni-app

产品分类: uniapp/小程序/微信

PC开发环境操作系统: Windows

PC开发环境操作系统版本号: windows 10

HBuilderX类型: 正式

HBuilderX版本号: 3.6.17

第三方开发者工具版本号: Stable 1.05.2204250

基础库版本号: 2.27.3

项目创建方式: HBuilderX

操作步骤:

在我那个项目,每点击一次都会报这个错误

预期结果:

希望在我点击时不要在控制台报这个错误

实际结果:

点击后就报错TypeError: Cannot read property 'setValidInit' of undefined,必现问题

bug描述:

我使用的是Vue3,当点击一个按钮时,就会触发这个报错,也可以响应点击,就是在console控制台会打印一个错误,如下:
TypeError: Cannot read property 'setValidInit' of undefined
at Je.<anonymous> (VM1990 WAService.js:formatted:60590)
at Je.S.Je.emit (VM1990 WAService.js:formatted:51655)
at emitInternal (VM1990 WAService.js:formatted:51895)
at VM1990 WAService.js:formatted:52082
at a.emit (VM1990 WAService.js:formatted:5564)
at P.dispatch (VM1990 WAService.js:formatted:5860)
at P.cb (VM1990 WAService.js:formatted:5885)
at s (VM9 asdebug.js:formatted:4935)
at c (VM9 asdebug.js:formatted:4942)
at VM9 asdebug.js:formatted:255(env: Windows,mp,1.05.2204250; lib: 2.27.3)

2023-01-30 22:11 负责人:无 分享
已邀请:
4***@qq.com

4***@qq.com (作者)

刚刚试了下,竟然是基础库2.27.3的问题,改成2.29.2就正常了

  • 1***@qq.com

    请问怎么升级呀

    2023-02-07 17:10

  • 1***@qq.com

    回复 1***@qq.com: 把project.private.config.json文件中的libVersion改成2.29.2

    2023-02-11 10:00

2***@qq.com

2***@qq.com

谢了

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

  • 标题 / 粗斜体
  • 代码片段
  • 超链接 / 图片 / 视频
  • 列表 / 引用

文章内容较多时,可以用标题分段 :

## 大标题 
### 小标题

斜体 / 粗体 :

**粗体** 
*斜体*
***粗斜体***

代码片段 :

``` javascript
代码片段
```

超链接 :

[链接文字](链接地址) 例: [百度](http://www.baidu.com)

图片 :

![图片说明](图片地址) 例: ![百度logo](http://www.baidu.com/img/bdlogo.gif)

视频 :

!![视频说明](视频地址) 例: !![优酷视频](http://youku.com)

有序列表 :

1. 123
2. 123
3. 123

无序列表 :

- 123
- 123
- 123

引用 : ( 双回车后结束引用 )

> 引用内容
引用内容
引用内容