uni-app 4.15版本出现编译BUG

uni-app 4.15版本出现编译BUG

开发环境 版本号 项目创建方式
Windows 10 HBuilderX

操作步骤:

  • 编译

预期结果:

  • 编译正常显示页面

实际结果:

  • 编译报错,
    13:29:16.193 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .
    at <Index>at <AsyncComponentWrapper>at <PageBody>at <Page>at <Anonymous>at <Layout>at <App>
    13:29:16.239 [TypeError] {message: "Cannot read properties of undefined (reading 'once')"}
    

bug描述:

  • 我是h5的一个项目,用的VUE3,4.08编译正常,4.15编译就报错了。
    13:29:16.193 [Vue warn]: Unhandled error during execution of scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .
    at <Index>at <AsyncComponentWrapper>at <PageBody>at <Page>at <Anonymous>at <Layout>at <App>
    13:29:16.239 [TypeError] {message: "Cannot read properties of undefined (reading 'once')"}
    

更多关于uni-app 4.15版本出现编译BUG的实战教程也可以访问 https://www.itying.com/category-93-b0.html

1 回复

更多关于uni-app 4.15版本出现编译BUG的实战教程也可以访问 https://www.itying.com/category-93-b0.html


uni-app 4.15 版本中,如果你遇到了编译 BUG,可以尝试以下步骤来排查和解决问题:


1. 确认问题

  • 描述具体的编译错误信息(例如:错误日志、控制台输出等)。
  • 确认是否是在特定平台(如 H5、微信小程序、App 等)上出现的问题。

2. 检查依赖和版本

  • 确保你的 HBuilderXuni-app 相关依赖是最新版本。
  • 检查 package.json 中的依赖是否与官方文档推荐的版本一致。
  • 运行以下命令更新依赖:
    npm install
    

3. 清理缓存

  • 清理项目缓存,重新编译:
    npm run dev:clean
    
  • 如果是 HBuilderX 项目,可以尝试:
    • 点击菜单栏的 运行 -> 清除缓存并重新运行

4. 检查代码

  • 检查是否有语法错误或不符合规范的代码。
  • 确保 pages.jsonmanifest.json 等配置文件没有错误。
  • 如果你使用了第三方插件或库,尝试暂时移除它们,看问题是否依然存在。

5. 查看官方文档和社区

  • 查看 uni-app 官方文档的 更新日志,确认是否有已知的 BUG 或兼容性问题。
  • DCloud 社区 或 GitHub Issues 中搜索是否有人遇到类似问题。

6. 降级版本

  • 如果确认是 uni-app 4.15 版本的 BUG,可以尝试降级到之前的稳定版本:
    npm install uni-app@4.14.0
回到顶部