NervJS / taro

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

taro-ui运行dev:rn报错 #14747

Open nowq2023 opened 1 year ago

nowq2023 commented 1 year ago

相关平台

React Native

使用框架: React

复现步骤

新建taro项目,引入app.ts文件引入 import 'taro-ui/dist/style/index.rn.scss' 就报错:error: node_modules\taro-ui\dist\style\index.rn.scss: Jest worker encountered 4 child process exceptions, exceeding retry limit

期望结果

可以正常运行

实际结果

目前无法正常使用taro-ui进行dev:rn

环境信息

👽 Taro v3.6.18

  Taro CLI 3.6.18 environment info:
    System:
      OS: Windows 10 10.0.22621
    Binaries:
      Node: 20.9.0 - C:\Program Files\nodejs\node.EXE
      Yarn: 1.22.19 - C:\Program Files\nodejs\node_global\yarn.CMD
      npm: 9.8.1 - C:\Program Files\nodejs\node_global\npm.CMD
    npmPackages:
      @tarojs/cli: 3.6.18 => 3.6.18
      @tarojs/components: 3.6.18 => 3.6.18
      @tarojs/components-rn: ^3.6.18 => 3.6.18
      @tarojs/helper: 3.6.18 => 3.6.18
      @tarojs/plugin-framework-react: 3.6.18 => 3.6.18
      @tarojs/plugin-platform-alipay: 3.6.18 => 3.6.18
      @tarojs/plugin-platform-h5: 3.6.18 => 3.6.18
      @tarojs/plugin-platform-jd: 3.6.18 => 3.6.18
      @tarojs/plugin-platform-qq: 3.6.18 => 3.6.18
      @tarojs/plugin-platform-swan: 3.6.18 => 3.6.18
      @tarojs/plugin-platform-tt: 3.6.18 => 3.6.18
      @tarojs/plugin-platform-weapp: 3.6.18 => 3.6.18
      @tarojs/react: 3.6.18 => 3.6.18
      @tarojs/rn-runner: ^3.6.18 => 3.6.18
      @tarojs/rn-supporter: ^3.6.18 => 3.6.18
      @tarojs/runtime: 3.6.18 => 3.6.18
      @tarojs/runtime-rn: ^3.6.18 => 3.6.18
      @tarojs/shared: 3.6.18 => 3.6.18
      @tarojs/taro: 3.6.18 => 3.6.18
      @tarojs/taro-loader: 3.6.18 => 3.6.18
      @tarojs/taro-rn: ^3.6.18 => 3.6.18
      @tarojs/webpack5-runner: 3.6.18 => 3.6.18
      babel-preset-taro: 3.6.18 => 3.6.18
      eslint-config-taro: 3.6.18 => 3.6.18
      expo: ~47.0.3 => 47.0.14
      react: ^18.1.0 => 18.2.0
      react-native: ^0.70.5 => 0.70.14
      taro-ui: ^3.1.1 => 3.1.1
zhiqingchen commented 1 year ago

https://github.com/NervJS/taro-ui/issues/1424#issuecomment-1041320614

nowq2023 commented 1 year ago

NervJS/taro-ui#1424 (comment)NervJS/taro-ui#1424(评论)

图片 图片 配置了还是这个问题,我创建项目是react版本不是rn的,不知道有没有影响

robinv8 commented 1 year ago

在 config.js 中添加如下配置:

alias: {
    '~taro-ui/dist': `~taro-ui/rn`,
  },

详情:https://github.com/NervJS/taro-ui/issues/1660

whqgo commented 12 months ago

taro 开发 app 并不是个很好的选择