简体   繁体   English

React native无法链接react-navigation和native-base-(Expo-CRNA Project)

[英]React native failing to link react-navigation and native-base - (Expo - CRNA Project)

In Expo React Native application, Following error occurred when executing react-native link after executing yarn add react-navigation native-base . 在Expo React Native应用程序中,在执行yarn add react-navigation native-base后执行react-native link时发生跟随错误。

Warning displayed when adding React Navigation and Native-Base 添加React Navigation和Native-Base时显示警告


warning “expo > react-native-maps@0.21.0” has incorrect peer dependency “react-native@^0.51 || ^0.52 || ^0.53 || ^0.54”.
warning “expo > react-native-reanimated@1.0.0-alpha.3” has incorrect peer dependency “react@16.0.0-alpha.6”.
warning “expo > react-native-reanimated@1.0.0-alpha.3” has incorrect peer dependency “react-native@^0.44.1”.
warning " > react-native@0.55.4" has incorrect peer dependency “react@16.3.1”.
warning “react-native > eslint-plugin-react-native@3.2.1” has unmet peer dependency “eslint@^3.17.0 || ^4.0.0”.
warning “react-navigation > create-react-context@0.2.2” has unmet peer dependency “prop-types@^15.0.0”.

Error facing while executing react-native link 执行本地反应链接时遇到错误


PS C:\Projects\proj> react-native link
Scanning folders for symlinks in C:\Projects\proj\node_modules (81ms)
rnpm-install info Linking assets to ios project
rnpm-install ERR! Something went wrong while linking. Error: Cannot read property ‘pbxprojPath’ of null
Please file an issue here: https://github.com/facebook/react-native/issues

react-native link command is for react-native projects that are created with react-native init command to link native dependencies. react-native link命令用于使用react-native init命令创建的,用于链接本机依赖关系的react-native项目。 You can read more about it here . 您可以在此处了解更多信息。

If your project created with create-react-native-app or using expo, please follow this (Setup with CRNA part) install process to add Native Base to your project. 如果您的项目是使用create-react-native-app或expo创建的,请按照此步骤 (使用CRNA进行安装)进行安装,以将Native Base添加到您的项目中。 react-navigation is pure JS library that doesn't need any native linking. react-navigation是纯JS库,不需要任何本地链接。

Create React Native project using the CRNA CLI. 使用CRNA CLI创建React Native项目。

CRNA helps you make React Native apps with no build configuration. CRNA可帮助您制作没有构建配置的React Native应用。 CRNA works on macOS, Windows, and Linux. CRNA可在macOS,Windows和Linux上运行。

 yarn add native-base --save npm install @expo/vector-icons --save 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM