NervJS / taro

开放式跨端跨框架解决方案,支持使用 React/Vue/Nerv 等框架来开发微信/京东/百度/支付宝/字节跳动/ QQ 小程序/H5/React Native 等应用。 https://taro.zone/
https://docs.taro.zone/
Other
35.34k stars 4.77k forks source link

没有修改任何东西的app运行起来就报错了.... #10974

Closed bug4j closed 2 years ago

bug4j commented 2 years ago

相关平台

H5

复现仓库

https://gitee.com/bug4j/taro-issuses-01.git 浏览器版本: Chrome 96 使用框架: Vue 3

复现步骤

npm run dev:h5 打开浏览器,页面空白,没有显示预期的demo页面 控制报错

vue3.ts?d42d:136 

       Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '$forceUpdate')
    at Object.updateAppInstance (vue3.ts?d42d:136)
    at Object.mount (vue3.ts?d42d:127)
    at mount (common.ts?d785:127)
    at Object.onLoad (common.ts?d785:144)
    at PageHandler.load (index.js?ddae:3022)
    at _callee$ (index.js?ddae:3298)
    at tryCatch (runtime.js?96cf:62)
    at Generator.invoke [as _invoke] (runtime.js?96cf:296)
    at Generator.prototype.<computed> [as next] (runtime.js?96cf:114)
    at asyncGeneratorStep (index.js?ddae:534)

期望结果

能正常显示demo页面

实际结果

页面空白

环境信息

Taro CLI 3.3.18 environment info:
    System:
      OS: Windows 10
    Binaries:
      Node: 14.15.3 - D:\Develop\nodejs\node.EXE
      Yarn: 1.22.11 - D:\Develop\nodejs\yarn.CMD
      npm: 6.14.9 - D:\Develop\nodejs\npm.CMD
491467928 commented 2 years ago

我也有这个问题,升级到最新版本3.3.18后H5跑起来就有这个问题,只有先回退版本了

ZakaryCode commented 2 years ago

3.3.18 中 vue3 to h5 确实存在问题,下一个版本修复

也可以在 AppConfig 中手动配置 appId 修复


{
  appId: 'app'
}
zhoustudent commented 2 years ago

hi,问下这个空白是必现的还是偶现的?