I am trying to integrate latest RN project into native project. Both project are in separate directories that means my native project does not exist in predefined ios folder.
versions:
RN Native: 0.63.3 @react-native-community/cli: 4.13.0 installed globally using yarn global add @react-native-community/cli.
I am getting error stating react-native-community package not found.
My pod file is mentioned below:
require_relative '../AwesomeProject/node_modules/react-native/scripts/react_native_pods'
require_relative '../AwesomeProject/node_modules/@react-native-community/cli-platform-ios/native_modules'
platform :ios, '10.0'
use_frameworks!
def main_pods
config = use_native_modules!
use_react_native!(:path => config["reactNativePath"])
end
target 'NativeFramework' do
main_pods
end
target 'Example' do
main_pods
end
Error:
[!] Invalid `Podfile` file: [!] /usr/local/bin/node -e try {console.log(require('@react-native-community/cli').bin);} catch (e) {console.log(require('react-native/cli').bin);}
internal/modules/cjs/loader.js:968
throw err;
^
Error: Cannot find module 'react-native/cli'