React native 未能 link react-navigation 和 native-base -(Expo - CRNA 项目)
React native failing to link react-navigation and native-base - (Expo - CRNA Project)
在 Expo React Native 应用程序中,在执行 yarn add react-navigation native-base
后执行 react-native link
时出现以下错误。
添加 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”.
执行本机反应时遇到错误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
命令用于使用 react-native init
命令创建的 react-native 项目到 link 本机依赖项。您可以阅读更多相关信息 here。
如果您的项目是使用 create-react-native-app
或使用 expo 创建的,请按照 this (使用 CRNA 部分设置) 安装过程将 Native Base 添加到您的项目。 react-navigation
是纯 JS 库,不需要任何原生 linking.
Create React Native project using the CRNA CLI.
CRNA helps you make React Native apps with no build configuration.
CRNA works on macOS, Windows, and Linux.
yarn add native-base --save
npm install @expo/vector-icons --save
在 Expo React Native 应用程序中,在执行 yarn add react-navigation native-base
后执行 react-native link
时出现以下错误。
添加 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”.
执行本机反应时遇到错误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
命令用于使用 react-native init
命令创建的 react-native 项目到 link 本机依赖项。您可以阅读更多相关信息 here。
如果您的项目是使用 create-react-native-app
或使用 expo 创建的,请按照 this (使用 CRNA 部分设置) 安装过程将 Native Base 添加到您的项目。 react-navigation
是纯 JS 库,不需要任何原生 linking.
Create React Native project using the CRNA CLI.
CRNA helps you make React Native apps with no build configuration. CRNA works on macOS, Windows, and Linux.
yarn add native-base --save npm install @expo/vector-icons --save