I've installed React Native Navigation V3 on a fresh install of React Native 0.60, manually as per the instructions here:
https://wix.github.io/react-native-navigation/#/docs/Installing
yarn add [email protected]
I am getting this error when I try to build:
/Users/{name}/App/node_modules/react-native-navigation/lib/ios/RNNOptions.h:2:9: 'React/RCTConvert.h' file not found
If I go to Product > Edit Scheme > Build (3 targets), I see React(missing)
which I'm assuming is what is causing the problem. When I try to add React
with the plus sign, there is no option for React
in React Native 0.60. Only the following, and I've tried React-Core with no success.
Any idea what might be going wrong?
I got the same issue today & took me half of a day trying different approach.
Finally found a very simple way.
Don't manually add React-native-navigation to Libraries & Build Phases. Instead just run
react-native link react-native-navigation
It adds pod 'ReactNativeNavigation', :path => '../node_modules/react-native-navigation
to Podfile and works like a charm!
Thanks @thinhtran3588! Works great!
Here are the steps for anyone else running into issues on React Native 0.60
yarn add [email protected]
react-native link react-native-navigation
pod install
Here steps what I've done to get it works for RN 060.
As mention above,
Do not manually add React-native-navigation to Libraries & Build Phases!
npm install --save react-native-navigation
react-native link react-native-navigation
pod install
After that you will be able to #import
Had the exact same issue, and the magic step missing for me was the pod install
step. Everything worked after that. Thanks, @airman00 !
In Xcode, in Project Navigator (left pane), right-click on the Libraries > Add files to [project name]. Add node_modules/react-native-navigation/lib/ios/ReactNativeNavigation.xcodeproj-------> need select copy files option
Here steps what I've done to get it works for RN 060.
As mention above,Do not manually add React-native-navigation to Libraries & Build Phases!
npm install --save react-native-navigation
react-native link react-native-navigation
pod install
After that you will be able to #import
in AppDelegate.m
AppDelegate.m doesn't give me problems now but the React/RCTConvert.h file not found
problem is still there.
If I rename <React/RCTConvert.h>
with "RCTConvert.h"
it doesn't give an error but I don't think it's a proper fix also because I should fix every RNN file.
Have someone figured it out? Why is this issue closed?
RNN 3.2.0
RN 0.61.2
To solve the issue, you have to do the following:
I've tried @airman00, @softmastx and @hb12DevTn solutions and am still facing this as I try to upgrade to React Native v0.61.4.
I was on an old version. After upgrading @softmastx solution fixed the issue.
Most helpful comment
Thanks @thinhtran3588! Works great!
Here are the steps for anyone else running into issues on React Native 0.60
yarn add [email protected]
react-native link react-native-navigation
pod install