csdds
csdds
  • 发布:2023-12-18 10:16
  • 更新:2023-12-18 10:31
  • 阅读:138

【报Bug】运行支付宝小程序报错组件未找到

分类:uni-app

产品分类: uniapp/小程序

PC开发环境操作系统: Windows

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

HBuilderX类型: 正式

HBuilderX版本号: 3.96

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

基础库版本号: 最新

项目创建方式: HBuilderX

示例代码:
// 字典标签组件  
import DictTag from '@/components/DictTag'  
// 字典数据组件  
import DictData from '@/components/DictData'  
// 字典标签组件  
import DictLabel from '@/components/DictLabel'  
// 图片预览组件  
import ImagePreview from "@/components/ImagePreview"  
// 图片上传组件  
import ImageUpload from "@/components/ImageUpload"  
// 标签回显  
import LabelShow from "@/components/LabelShow"  

Vue.use(directive)  
Vue.use(plugins)  
Vue.use(uView);  
// const vconsole = new VConsole();  
// window.vconsole = vconsole;  

Vue.config.productionTip = false  
// 全局方法挂载  
Vue.prototype.getDicts = getDicts  
Vue.prototype.$store = store  
Vue.prototype.addDateRange = addDateRange  
Vue.prototype.selectDictLabel = selectDictLabel  
Vue.prototype.copyText = copyText  
DictData.install()  

Vue.component('DictTag', DictTag)  
Vue.component('DictLabel', DictLabel)  
Vue.component('ImagePreview', ImagePreview)  
Vue.component('ImageUpload', ImageUpload)  
Vue.component("LabelShow", LabelShow);

操作步骤:

运行到支付宝小程序

预期结果:

运行到支付宝小程序正常显示

实际结果:

运行到支付宝小程序报错,组件未找到

bug描述:

运行到浏览器正常,运行到支付宝小程序提示组件未找到,组件是main.js全局注册的,文件夹包括文件名也不包含@

2023-12-18 10:16 负责人:无 分享
已邀请:
YUANRJ

YUANRJ

请提供下测试工程

  • csdds (作者)

    https://ask.dcloud.net.cn/question/152300?notification_id-84803rf-falseitem_id-25486


    您好,上午的问题将两个没有用到的页面从pages.json去除解决了,但是现在出现了上面链接中的问题

    2023-12-18 13:54

  • YUANRJ

    回复 1***@qq.com: 提供下测试工程吧

    2023-12-18 14:19

  • csdds (作者)

    回复 YUANRJ: 已更新到机密信息

    2023-12-18 14:29

  • csdds (作者)

    回复 YUANRJ: 刚才上传文件的时候将依赖包删除了,然后重新安装了一下再运行到小程序,报错了ypeError: Cannot read properties of undefined (reading 'Vue'),但是页面tabbar切换出来了,页面显示的是系统错误,正在排查

    2023-12-18 14:37

  • csdds (作者)

    目前的问题是运行到支付宝小程序后,报错TypeError: Cannot read properties of undefined (reading 'Vue'), node版本16.15.1

    2023-12-18 14:49

  • YUANRJ

    回复 1***@qq.com: 清除下编译缓存试试。如还有问题,请提供最简可复现的工程,而不是整个项目,这样我们才更快的定位问题,谢谢。

    2023-12-18 15:10

要回复问题请先登录注册