Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

taro 4.0.0-beta.25 to harmony后在DevEco无法运行 #15382

Closed
LesterWeng opened this issue Mar 21, 2024 · 5 comments
Closed

taro 4.0.0-beta.25 to harmony后在DevEco无法运行 #15382

LesterWeng opened this issue Mar 21, 2024 · 5 comments
Labels
F-react Framework - React T-harmony Target - 编译到 Harmony V-3 Version - 3.x

Comments

@LesterWeng
Copy link
Contributor

相关平台

鸿蒙

复现仓库

https://github.com/LesterWeng/taro-issue-harmony1.git

使用框架: React

复现步骤

yarn

修改下config/index harmony路径配置

yarn run dev:harmony

在deveco打开模拟器,运行查看,发现应用卡在进入页,打开log发现不停抛出errror

期望结果

deveco能正常运行,使用taro开发的鸿蒙页面能正常投入使用

实际结果

无法运行

环境信息

👽 Taro v4.0.0-beta.25


  Taro CLI 4.0.0-beta.25 environment info:
    System:
      OS: macOS 12.6
      Shell: 5.8.1 - /bin/zsh
    Binaries:
      Node: 16.20.1 - ~/.nvm/versions/node/v16.20.1/bin/node
      Yarn: 1.22.21 - ~/.nvm/versions/node/v16.20.1/bin/yarn
      npm: 8.19.4 - ~/.nvm/versions/node/v16.20.1/bin/npm
    npmPackages:
      @tarojs/api: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/cli: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/components: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/mini-runner: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/plugin-framework-react: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/react: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/taro: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/taro-h5: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/webpack-runner: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/webpack5-prebundle: 4.0.0-beta.25 => 4.0.0-beta.25 
      @tarojs/webpack5-runner: 4.0.0-beta.25 => 4.0.0-beta.25 
      babel-preset-taro: 4.0.0-beta.25 => 4.0.0-beta.25 
      eslint-config-taro: 4.0.0-beta.25 => 4.0.0-beta.25 
      react: 17.0.2 => 17.0.2 

补充信息

DevEco Studio NEXT Developer Preview1
Build Version: 4.1.3.500, built on January 20, 2024

相关图片:
image

image

image

image

image

@taro-bot2 taro-bot2 bot added F-react Framework - React T-harmony Target - 编译到 Harmony V-3 Version - 3.x labels Mar 21, 2024
@LesterWeng
Copy link
Contributor Author

忽略node16信息,安装依赖时是node18
Node: 18.17.0 - ~/.nvm/versions/node/v18.17.0/bin/node

@xuanzebin
Copy link
Member

经排查,是 react 版本过低导致的报错,可以将版本调整至 18 再重新编译试试:

{
  "dependencies": {
      "react": "18.0.0",
      "react-dom": "18.0.0",
  }
}

@LesterWeng
Copy link
Contributor Author

经排查,是 react 版本过低导致的报错,可以将版本调整至 18 再重新编译试试:

{
  "dependencies": {
      "react": "18.0.0",
      "react-dom": "18.0.0",
  }
}

好的 我试试 taro4应该是要支持react17的吧?

@xuanzebin
Copy link
Member

应该是会支持的,目前应该是有点小问题,之后得排查一下

@LesterWeng
Copy link
Contributor Author

好的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-react Framework - React T-harmony Target - 编译到 Harmony V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

2 participants