1,npx degit dcloudio/uni-preset-vue#vite my-vue3-project
2,yarn yarn build:mp-weixin --subpackage=test
3, 集成到原生微信小程序,运行
- 发布:2022-04-14 10:16
- 更新:2022-04-14 22:32
- 阅读:843
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10
第三方开发者工具版本号: 3.3.13
基础库版本号: vue3
项目创建方式: CLI
CLI版本号: 3.0.0-alpha-3031320220314002
操作步骤:
预期结果:
正确打开uniapp的页面
正确打开uniapp的页面
实际结果:
报如下错误
VM760 WAService.js:2 TypeError: Cannot read property '$createComponent' of undefined
at $vm.type (vendor.js? [sm]:1)
at se.attached (vendor.js? [sm]:1)
at n.safeCallback (VM760 WAService.js:2)
at n.call (VM760 WAService.js:2)
at n (VM760 WAService.js:2)
at E (VM760 WAService.js:2)
at Function.Q.pretendAttached (VM760 WAService.js:2)
at Module.We (VM760 WAService.js:2)
at Le (VM760 WAService.js:2)
at VM760 WAService.js:2
报如下错误
VM760 WAService.js:2 TypeError: Cannot read property '$createComponent' of undefined
at $vm.type (vendor.js? [sm]:1)
at se.attached (vendor.js? [sm]:1)
at n.safeCallback (VM760 WAService.js:2)
at n.call (VM760 WAService.js:2)
at n (VM760 WAService.js:2)
at E (VM760 WAService.js:2)
at Function.Q.pretendAttached (VM760 WAService.js:2)
at Module.We (VM760 WAService.js:2)
at Le (VM760 WAService.js:2)
at VM760 WAService.js:2
bug描述:
使用最新的cli版本进行微信小程序的混合打包运行,运行时报下面的错误,无法正常运行
TypeError: Cannot read property '$createComponent' of undefined
at $vm.type (vendor.js? [sm]:1)
at se.attached (vendor.js? [sm]:1)
at n.safeCallback (VM760 WAService.js:2)
at n.call (VM760 WAService.js:2)
at n (VM760 WAService.js:2)
at E (VM760 WAService.js:2)
at Function.Q.pretendAttached (VM760 WAService.js:2)
at Module.We (VM760 WAService.js:2)
at Le (VM760 WAService.js:2)
at VM760 WAService.js:2
其他形式的打包运行没有问题
1 个回复
DCloud_UNI_FXY
https://github.com/dcloudio/uni-app/issues/3416