Skip to content

使用react-native代码,通过@tarojs/plugin-platform-harmony-cpp构建harmony,页面超过一定数量之后,会报如下错误 #18910

@StillAlexLiu

Description

@StillAlexLiu

请先确认

  • 我已搜索并确定这个提交不是重复的

Taro 版本

v4

相关领域

None

使用框架

React

相关平台

  • 所有平台
  • Web 端(H5)
  • 移动端(React-Native)
  • 鸿蒙(Harmony)
  • 鸿蒙容器(Harmony Hybrid)
  • ASCF 元服务
  • 快应用(QuickApp)
  • 所有小程序
  • 微信小程序
  • 企业微信小程序
  • 京东小程序
  • 百度小程序
  • 支付宝小程序
  • 支付宝 IOT 小程序
  • 头条小程序
  • QQ 小程序
  • 钉钉小程序
  • 飞书小程序
  • 快手小程序

小程序基础库版本

No response

问题描述

使用react-navite构建移动端项目,当引入@tarojs/plugin-platform-harmony-cpp后运行taro build --type harmony_cpp,会出现如下错误:

`
transforming (1) taro:compilerUnexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:
(taro:vite-harmony-entry) load "\u0000/Users/username/IdeaProjects/app-next/src/app.tsx?entry-loader=true"
(taro:vite-style) transform "/Users/username/IdeaProjects/app-next/src/pages/index/main/newsDetail.tsx"
(taro:vite-harmony-page) load "\u0000/Users/username/IdeaProjects/app-next/src/pages/index/main/main.tsx?page-loader=true"
(taro:vite-style) transform "/Users/username/IdeaProjects/app-next/src/pages/index/todo/schedule/scheduleAdd.tsx"

.......
`

经过排查,当页面超过一定数量后(4个tab+21个页面)会出现上述问题,这边项目总计有4个tab+25个页面,随机减少任意4个tab后,都可以正常编译构建。

问题:文档上没有关于页面数量限制等相关内容,@tarojs/plugin-platform-harmony-cpp也没有相关的文档,@tarojs/plugin-platform-harmony-cpp对应的git仓库主页已经好多年没有维护了,应该是主页地址写错了,最后找到了这里

复现链接

/

复现步骤

  1. 4个tab+任意21个页面:正常构建
  2. 4个tab+多余21个页面:报错
  3. 4个tab+少于等于21个页面正常构建后,修改app.config.ts文件,使页面增加到多余21个,触发--watch重新构建修改的文件:正常

环境信息

👽 Taro v4.1.11


  Taro CLI 4.1.11 environment info:
    System:
      OS: macOS 26.3
      Shell: 5.9 - /bin/zsh
    Binaries:
      Node: 24.14.0 - /opt/homebrew/opt/node@24/bin/node
      Yarn: 1.22.22 - /opt/homebrew/bin/yarn
      npm: 11.9.0 - /opt/homebrew/opt/node@24/bin/npm
    npmPackages:
      @tarojs/cli: 4.1.11 => 4.1.11 
      @tarojs/components: 4.1.11 => 4.1.11 
      @tarojs/components-rn: 4.1.11 => 4.1.11 
      @tarojs/helper: 4.1.11 => 4.1.11 
      @tarojs/plugin-framework-react: 4.1.11 => 4.1.11 
      @tarojs/plugin-platform-alipay: 4.1.11 => 4.1.11 
      @tarojs/plugin-platform-h5: 4.1.11 => 4.1.11 
      @tarojs/plugin-platform-jd: 4.1.11 => 4.1.11 
      @tarojs/plugin-platform-qq: 4.1.11 => 4.1.11 
      @tarojs/plugin-platform-swan: 4.1.11 => 4.1.11 
      @tarojs/plugin-platform-tt: 4.1.11 => 4.1.11 
      @tarojs/plugin-platform-weapp: 4.1.11 => 4.1.11 
      @tarojs/react: 4.1.11 => 4.1.11 
      @tarojs/rn-runner: 4.1.11 => 4.1.11 
      @tarojs/rn-supporter: 4.1.11 => 4.1.11 
      @tarojs/runtime: 4.1.11 => 4.1.11 
      @tarojs/runtime-rn: 4.1.11 => 4.1.11 
      @tarojs/shared: 4.1.11 => 4.1.11 
      @tarojs/taro: 4.1.11 => 4.1.11 
      @tarojs/taro-loader: 4.1.11 => 4.1.11 
      @tarojs/taro-rn: 4.1.11 => 4.1.11 
      @tarojs/vite-runner: ^4.1.11 => 4.1.11 
      @tarojs/webpack5-runner: 4.1.11 => 4.1.11 
      babel-preset-taro: 4.1.11 => 4.1.11 
      eslint-config-taro: 4.1.11 => 4.1.11 
      expo: ~50.0.0 => 50.0.21 
      react: ^18 => 18.3.1 
      react-native: ^0.73.1 => 0.73.11

开源贡献

Metadata

Metadata

Assignees

No one assigned

    Labels

    F-reactFramework - ReactT-harmonyTarget - 编译到 HarmonyT-rnTarget - 编译到 React NativeV-4Version - 4.xbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions