l***@163.com
l***@163.com
  • 发布:2021-10-13 15:17
  • 更新:2021-10-22 12:07
  • 阅读:434

hbuider-a 3.2.10微信小程序报错

分类:uni-app

编译小程序报错,切换到上一版本可以正常编译
查找文件失败 详情见附件

2021-10-13 15:17 负责人:无 分享
已邀请:

最佳回复

DCloud_UNI_GSQ

DCloud_UNI_GSQ

HBuilderX alpha 3.2.11 已修复

临时解决方案

在 uniapp-cli 目录下执行 npm i @dcloudio/uni-mp-vue@alpha @vue/shared@3.2.20

  • 爱丶

    微信小程序 vue3 中使用 hbx 3.2.10 alpha 版本+临时解决方案可以运行起项目,但是出现新的报错问题。


    TypeError: Cannot convert undefined or null to object  
    at a.keys (<anonymous>)
    at patch (vendor.js? [sm]:4763)
    at ReactiveEffect.componentUpdateFn [as fn] (vendor.js? [sm]:4890)
    at ReactiveEffect.run (vendor.js? [sm]:474)
    at setupRenderEffect (vendor.js? [sm]:4927)
    at mountComponent (vendor.js? [sm]:4843)
    at createComponent (vendor.js? [sm]:4961)
    at $createComponent (vendor.js? [sm]:7683)
    at Ui.attached (vendor.js? [sm]:7767)
    at i.safeCallback (VM103 WAService.js:2)(env: Windows,mp,1.05.2110110; lib: 2.20.0)

    2021-10-15 09:21

  • DCloud_UNI_GSQ

    回复 爱丶: @dcloudio/uni-mp-vue 版本安装为 alpha 没?

    2021-10-15 11:14

  • 爱丶

    回复 DCloud_UNI_GSQ:


    {  
    "_from": "@dcloudio/uni-mp-vue@alpha",
    "_id": "@dcloudio/uni-mp-vue@2.0.0-alpha-32920211012001",
    "_inBundle": false,
    "_integrity": "sha512-cfcrpw4+G7exmIqg9xbGsGfoa+sNkHMLLc0XE+uwGIWVEjOgRYw1Nbl+6DA/XqD7pV3gvUpZ8tRXE/MDoCPD0A==",
    "_location": "/@dcloudio/uni-mp-vue",
    "_phantomChildren": {},
    "_requested": {
    "type": "tag",
    "registry": true,
    "raw": "@dcloudio/uni-mp-vue@alpha",
    "name": "@dcloudio/uni-mp-vue",
    "escapedName": "@dcloudio%2funi-mp-vue",
    "scope": "@dcloudio",
    "rawSpec": "alpha",
    "saveSpec": null,
    "fetchSpec": "alpha"
    },
    "_requiredBy": [
    "#USER",
    "/"
    ],
    "_resolved": "https://registry.npmjs.org/@dcloudio/uni-mp-vue/-/uni-mp-vue-2.0.0-alpha-32920211012001.tgz",
    "_shasum": "6947c33254d173e3aded5d07638c4524d54bce5e",
    "_spec": "@dcloudio/uni-mp-vue@alpha",
    "_where": "E:\\projects\\HBuilderProjects\\dnvue-ui-v3",
    "bugs": {
    "url": "https://github.com/dcloudio/uni-app/issues"
    },
    "buildOptions": {
    "name": "Vue",
    "formats": [
    "esm-bundler-vue"
    ]
    },
    "bundleDependencies": false,
    "deprecated": false,
    "description": "@dcloudio/uni-mp-vue",
    "files": [
    "dist"
    ],
    "gitHead": "c028ad78454d484a8068ca6610878265af377cb0",
    "homepage": "https://github.com/dcloudio/uni-app#readme",
    "license": "Apache-2.0",
    "main": "dist/vue.runtime.esm.js",
    "module": "dist/vue.runtime.esm.js",
    "name": "@dcloudio/uni-mp-vue",
    "repository": {
    "type": "git",
    "url": "git+https://github.com/dcloudio/uni-app.git",
    "directory": "packages/uni-mp-vue"
    },
    "sideEffects": false,
    "version": "2.0.0-alpha-32920211012001"
    }

    2021-10-15 11:54

  • DCloud_UNI_GSQ

    回复 爱丶: 新建的项目运行报这个错误吗?

    2021-10-15 12:17

  • 爱丶

    回复 DCloud_UNI_GSQ: 是的,复现步骤:

    1.新建项目

    2.vue版本选择vue3

    3.执行临时解决方案 npm i @dcloudio/uni-mp-vue@alpha @vue/shared@3.2.20

    4.运行到微信小程序

    运行结果:报错TypeError: Cannot convert undefined or null to object

    初步测试结果:虽然程序还可以运行,但是组件中涉及到计算属性(computed)的都失效了,计算属性(computed)内没任何响应。

    2021-10-15 14:03

  • DCloud_UNI_GSQ

    回复 爱丶: 更新试下

    2021-10-22 12:08

  • 爱丶

    回复 DCloud_UNI_GSQ: 谢谢,幸苦了,刚更新了最新版本目前可以正常运行了。

    2021-10-22 16:22

DCloud_UNI_GSQ

DCloud_UNI_GSQ

在插件里删除 uni-app 编译插件,重新安装试试。如果仍然存在问题,详细描述一下复现步骤。

  • l***@163.com (作者)

    重新安装也不行

    复现步骤,新建项目->vue版本选择vue3->填写小程序APPID->运行到小程序 报错文件查找失败

    2021-10-13 19:14

l***@163.com

l***@163.com (作者)

新建的项目

要回复问题请先登录注册