j***@126.com
j***@126.com
  • 发布:2022-06-14 12:48
  • 更新:2023-01-03 10:32
  • 阅读:1180

【报Bug】[Vue warn]: Failed to resolve component: barcode

分类:uni-app

产品分类: uniapp/App

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.4.15

手机系统: Android

手机系统版本号: Android 12

手机厂商: 小米

手机机型: redmi k20

页面类型: vue

vue版本: vue3

打包方式: 云端

项目创建方式: HBuilderX

示例代码:
uni.scanCode({    
                    success(res) {    
                        if (res.errMsg == "scanCode:ok") {    

                        }    
                    }    
                });

操作步骤:
uni.scanCode({    
                    success(res) {    
                        if (res.errMsg == "scanCode:ok") {    

                        }    
                    }    
                });

预期结果:

不报错

实际结果:

报错:

10:34:39.844 [Vue warn]: Failed to resolve component: barcode    
10:34:39.875 If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.    
10:34:39.906 at <App__pageId=NaN__pagePath="template/__uniappscan"__pageQuery={}>  

bug描述:

执行以下扫码代码时

uni.scanCode({    
                    success(res) {    
                        if (res.errMsg == "scanCode:ok") {    

                        }    
                    }    
                });

就会报以下错误

10:34:39.844 [Vue warn]: Failed to resolve component: barcode    
10:34:39.875 If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.    
10:34:39.906 at <App__pageId=NaN__pagePath="template/__uniappscan"__pageQuery={}>  
2022-06-14 12:48 负责人:无 分享
已邀请:
DCloud_UNI_Anne

DCloud_UNI_Anne

已反馈给相关人员排查,已加分感谢反馈!

DCloud_UNI_LXH

DCloud_UNI_LXH

bug 已确认,预计下版修复

风之源

风之源 - 我这么闲给你评论,是因为我的问题还没有人回答~

有没有办法屏蔽报错啊,我也有这个问题,而且因为多次调用,控制台直接爆满几十行全是这玩意

  • 陵域

    HBuilder X3.4.18,会报错?

    2022-07-07 16:10

  • 风之源

    回复 陵域: 我用了原生组件,组件能正常用,但是控制台一直显示“[Vue warn]: Failed to resolve component:xxx”

    2022-07-07 16:15

DCloud_UNI_Anne

DCloud_UNI_Anne

HBuilderX 3.4.18 已修复

  • z***@163.com

    3.4.18.20220630 版本还有这种情况

    2022-07-18 17:03

z***@163.com

z***@163.com

3.4.18.20220630 版本还有这种情况

  • DCloud_UNI_Anne

    未复现此问题,请提供可复现最小化示例(上传附件)方便排查哦

    2022-07-20 21:14

1***@qq.com

1***@qq.com

我也有这个问题,uni.scanCode会出这个错,我的版本是3.4.7

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