相关平台
React Native
使用框架: React
复现步骤
初次执行 yarn dev:rn 就报错,无法正常编译到react-native
期望结果
期望编译成功,运行不报错
实际结果
编译报错
环境信息
👽 Taro v3.5.6
Taro CLI 3.5.6 environment info:
System:
OS: macOS 13.0
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.6.0 - ~/.nvm/versions/node/v16.6.0/bin/node
Yarn: 1.22.19 - ~/.nvm/versions/node/v16.6.0/bin/yarn
npm: 7.19.1 - ~/.nvm/versions/node/v16.6.0/bin/npm
npmPackages:
@tarojs/cli: ^3.5.6 => 3.5.6
@tarojs/components: ^3.5.6 => 3.5.6
@tarojs/helper: ^3.5.6 => 3.5.6
@tarojs/mini-runner: 3.5.6 => 3.5.6
@tarojs/plugin-framework-react: ^3.5.6 => 3.5.6
@tarojs/plugin-platform-swan: ^3.5.6 => 3.5.6
@tarojs/react: ^3.5.6 => 3.5.6
@tarojs/rn-runner: ^3.5.10 => 3.5.10
@tarojs/router: ^3.5.6 => 3.5.6
@tarojs/runtime: ^3.5.6 => 3.5.6
@tarojs/shared: ^3.5.6 => 3.5.6
@tarojs/taro: ^3.5.6 => 3.5.6
@tarojs/taro-h5: ^3.5.6 => 3.5.6
@tarojs/taro-rn: ^3.5.10 => 3.5.10
@tarojs/webpack5-runner: ^3.5.6 => 3.5.6
babel-preset-taro: 3.5.6 => 3.5.6
eslint-config-taro: 3.5.6 => 3.5.6
expo: ~46.0.1 => 46.0.19
react: ^18.0.0 => 18.2.0
react-native: ^0.69.3 => 0.69.7
taro-ui: 3.0.0-alpha.10 => 3.0.0-alpha.10
4条答案
按热度按时间kuuvgm7e1#
提供下demo
zazmityj2#
提供下demo
@zhiqingchen
Demo地址: https://github.com/xianguoGou/taro-rn-test-demo
运行命令
yarn dev:rn
即可复现通过测试, 发现
/config/dev.js
文件中的defineConstants
属性定义多个常量会抛错。截图如下:wnrlj8wa3#
试试不使用
zu0ti5jz4#
试试不使用
不行,常量配置超过1个,都会报错