n***@163.com
n***@163.com
  • 发布:2024-10-10 10:35
  • 更新:2024-10-11 10:06
  • 阅读:101

【报Bug】uni-app项目升级到最新的vue3之后无法运行 quickapp-webivew-huawei

分类:uni-app

产品分类: uniapp/快应用/华为

渲染模式: webview

操作步骤:
  1. Gitee下载uniapp vue3最新demo项目;
  2. yarn install完成之后 yarn dev:quickapp-webview-huawei
  3. 使用华为快应用IDE打开 dist/dev/quickapp-webview-huawei目录
  4. 连接手机Mate60 (鸿蒙4.2版本,非HarmonyOS Next)
  5. 运行项目就出现以下错误信息
    • 缺少必要的配置文件,把vue2项目生成的 quickapp.config.json 复制进来后临时解决;
    • 手机端快应用提示有错误,IDE控制台输出错误:
      10-10 10:22:58.122 E/jsLog   ( 9046): Runtime Error, Page : pages/index/index  
      10-10 10:22:58.122 E/jsLog   ( 9046): Runtime Error, ErrorCode :   
      10-10 10:22:58.122 E/jsLog   ( 9046): TypeError: Cannot read properties of undefined (reading 'onLoad')  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at isPage (hbs:7009:31)  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at Component.attached (hbs:6930:20)  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at hbs-frk:1:224224  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at Array.forEach (<anonymous>)  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at t (hbs-frk:1:224197)  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at Component.disposeLifetime (hbs-frk:1:224378)  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at hbs-frk:1:225525  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at Array.forEach (<anonymous>)  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at Component._triggerLifetime (hbs-frk:1:225489)  
      10-10 10:22:58.122 E/jsLog   ( 9046):     at triggerLifetime (hbs-frk:1:238972)  
      10-10 10:22:58.147 W/jsLog   ( 9046): pages/index/index is not ready

预期结果:

正常运行

实际结果:
10-10 10:22:58.122 E/jsLog   ( 9046): Runtime Error, Page : pages/index/index  
10-10 10:22:58.122 E/jsLog   ( 9046): Runtime Error, ErrorCode :   
10-10 10:22:58.122 E/jsLog   ( 9046): TypeError: Cannot read properties of undefined (reading 'onLoad')  
10-10 10:22:58.122 E/jsLog   ( 9046):     at isPage (hbs:7009:31)  
10-10 10:22:58.122 E/jsLog   ( 9046):     at Component.attached (hbs:6930:20)  
10-10 10:22:58.122 E/jsLog   ( 9046):     at hbs-frk:1:224224  
10-10 10:22:58.122 E/jsLog   ( 9046):     at Array.forEach (<anonymous>)  
10-10 10:22:58.122 E/jsLog   ( 9046):     at t (hbs-frk:1:224197)  
10-10 10:22:58.122 E/jsLog   ( 9046):     at Component.disposeLifetime (hbs-frk:1:224378)  
10-10 10:22:58.122 E/jsLog   ( 9046):     at hbs-frk:1:225525  
10-10 10:22:58.122 E/jsLog   ( 9046):     at Array.forEach (<anonymous>)  
10-10 10:22:58.122 E/jsLog   ( 9046):     at Component._triggerLifetime (hbs-frk:1:225489)  
10-10 10:22:58.122 E/jsLog   ( 9046):     at triggerLifetime (hbs-frk:1:238972)  
10-10 10:22:58.147 W/jsLog   ( 9046): pages/index/index is not ready

bug描述:

将uniapp的vue2项目升级到vue3之后,再运行quickapp-webview-huawei之后 提示缺少必要的配置文件, 添加quickapp.config.json后再次运行,会提示 TypeError: Cannot read properties of undefined (reading 'onLoad') 。

通过Gitee下载最新的 uniapp vue3版本demo项目运行之后也是出现一样的问题。

现在华为快应用渠道已无法继续发版,还请官方帮解决一下,感谢~

版本信息如下:

  1. uni-app cli模式安装,版本:3.0.0-4020920240930001
  2. node版本v18.20.4 yarn版本1.22.22
  3. 华为快应用IDE版本:14.1.1
2024-10-10 10:35 负责人:无 分享
已邀请:
n***@163.com

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

求关注啊. 版本都不能发补了, 真的太坑.

要回复问题请先登录注册