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

windows 通过模板初始化RN报错 #10485

Closed
zhiqingchen opened this issue Oct 22, 2021 · 3 comments
Closed

windows 通过模板初始化RN报错 #10485

zhiqingchen opened this issue Oct 22, 2021 · 3 comments
Labels
F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x

Comments

@zhiqingchen
Copy link
Member

相关平台

React Native

使用框架: React

复现步骤

用新的RN模板新建一个项目,可以正常运行二维码预览
但是运行upgradePeerdeps后就报错了。

期望结果

正常运行

实际结果

ERROR Invariant Violation: Tried to register two views with the same name RNCSafeAreaProvider
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is in
correct.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is in
correct.
This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

环境信息

👽 Taro v3.3.9


  Taro CLI 3.3.9 environment info:
    System:
      OS: macOS 11.6
      Shell: 5.8 - /bin/zsh
    Binaries:
      Node: 15.12.0 - /usr/local/bin/node
      Yarn: 1.22.10 - ~/.nvm/versions/node/v15.12.0/bin/yarn
      npm: 7.6.3 - ~/.nvm/versions/node/v15.12.0/bin/npm
    npmPackages:
      @tarojs/cli: 3.3.9 => 3.3.9
      @tarojs/components: 3.3.9 => 3.3.9
      @tarojs/mini-runner: 3.3.9 => 3.3.9
      @tarojs/react: 3.3.9 => 3.3.9
      @tarojs/runtime: 3.3.9 => 3.3.9
      @tarojs/taro: 3.3.9 => 3.3.9
      @tarojs/webpack-runner: 3.3.9 => 3.3.9
      babel-preset-taro: 3.3.9 => 3.3.9
      eslint-config-taro: 3.3.9 => 3.3.9
      react: ^17.0.0 => 17.0.2
      react-native: ^0.64.0 => 0.64.2
    npmGlobalPackages:
      typescript: 4.2.3
@taro-bot2 taro-bot2 bot added F-react Framework - React T-rn Target - 编译到 React Native V-3 Version - 3.x labels Oct 22, 2021
@zhiqingchen
Copy link
Member Author

(此为 issue 记录)

原因为 windows 下 yarn upgradePeerdeps 安装的版本不一致。

可手动修复 package.json 下的依赖版本,参考 https://github.com/wuba/taro-playground

@zhiqingchen
Copy link
Member Author

zhiqingchen commented Oct 22, 2021

taro: 3.3.10 rn: 0.64

NervJS/taro-project-templates@8a54a05

需修改 ios/Podfile

platform :ios, '11.0'

NervJS/taro-project-templates@2738c13
修改 ios/taroDemo.xcodeproj/project.pbxproj

IPHONEOS_DEPLOYMENT_TARGET = 11.0;

@zhiqingchen
Copy link
Member 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-rn Target - 编译到 React Native V-3 Version - 3.x
Projects
None yet
Development

No branches or pull requests

1 participant