No podspec found for `React` in `../node_modules/react-native` - react-native

No podspec found for React in ../node_modules/react-native
I am getting above error when i do pod install after successful npm install
NPM Version : 5.6.0
Below is the pod file text
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
react_native_path = '../node_modules/react-native'
pod 'Yoga', :path => "#{react_native_path}/ReactCommon/yoga"
pod 'React', :path => react_native_path, :subspecs => [
'Core',
'RCTText',
'RCTImage',
'DevSupport',
'BatchedBridge',
'RCTLinkingIOS',
'RCTAnimation',
'RCTActionSheet',
'RCTWebSocket', # needed for debugging
# Add any other subspecs you want to use in your project
]
end

Check that file ../node_modules/react-native/React.podspec is really exists relative to Podfile. If not, check that you package.json really contain react-native as dependency.
For standard RN project directory structure, Podfile should be placed in <projectRoot>/ios/Podfile, and looks like:
platform :ios, '9.0'
target 'CGUI' do
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge',
'RCTAnimation',
'RCTBlob',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'RCTImage',
'RCTLinkingIOS',
'DevSupport',
]
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'GLog', :podspec => '../node_modules/react-native/third-party-podspecs/GLog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'RNFS', :path => '../node_modules/react-native-fs'
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
end
This is for RN 0.51.0

after successful npm install,
delete the file podfile.lock in your project root dir,
then pod install in your project root dir.
this works for me.

Go to your project directory
in IOS write command in terminal to open Xcode
open ios/[projectname].xcworkspace
and open Pods folder from the left navigation bar and open Profile file
after that remove the line,
pod 'RNVectorIcons', :path => '../node_modules/react-native-vector-icons'
and rebuild project.

Related

Build fail when using use_frameworks! react-native

I'm developing an app using React-native 0.59.1. But I've got an issue that I can not link a static library. In Podfile I am installing both frameworks and library using Cocapods.
Xcode will throw an error the library is not linked yet when Podfile contains the keyword use_framework!, but is successful if I remove this keyword.
Can you help me to fix it?
platform :ios, '10.0'
target 'Test_RN_0_59_1' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
rn_path = '../node_modules/react-native'
pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
pod 'DoubleConversion', :podspec => "#{rn_path}/third-party-podspecs/DoubleConversion.podspec"
pod 'Folly', :podspec => "#{rn_path}/third-party-podspecs/Folly.podspec"
pod 'glog', :podspec => "#{rn_path}/third-party-podspecs/GLog.podspec"
pod 'React', path: rn_path, subspecs: [
'Core',
'CxxBridge',
'RCTAnimation',
'RCTActionSheet',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTSettings',
'RCTText',
'RCTVibration',
'RCTWebSocket',
'RCTPushNotification',
'RCTCameraRoll',
'RCTSettings',
'RCTBlob',
'RCTGeolocation',
'DevSupport'
]
pod 'rn-juicy-score', :path => '../node_modules/rn-juicy-score'
Capture
If you want to use static library with use_framework! in React Native, you can use the following solution:
...
pod 'rn-juicy-score', :path => '../node_modules/rn-juicy-score'
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('rn-juicy-score')
def pod.build_type
Pod::BuildType.static_library
end
end
end
end
Adding a condition in pre_install block would make sure your specified pod is built using static library and the rest are built using dynamic framework. This will allow you to use both build systems and configure according to requirement.
If you are using react native > 0.68.x, you need use use_frameworks!, you must to add in your Podfile this code:
$static_framework = ['Flipper-Boost-iOSX', 'Flipper-RSocket', 'glog', 'Yoga', 'YogaKit', 'React-logger', 'Flipper-Fmt', 'RCT-Folly', 'Flipper-Folly', 'React-jsi', 'FlipperKit', 'Flipper', 'Flipper-Glog', 'Flipper-PeerTalk', 'React-cxxreact', 'React-jsiexecutor', 'React-Core', 'React-RCTText', 'RCTTypeSafety', 'ReactCommon', 'React-Codegen', 'React-RCTVibration', 'React-RCTSettings', 'React-RCTNetwork', 'React-RCTLinking', 'React-RCTAnimation', 'React-RCTBlob', 'React-RCTImage', 'React-CoreModules']
pre_install do |installer|
Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
installer.pod_targets.each do |pod|
if $static_framework.include?(pod.name)
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end
use_react_native!(
:path => config[:reactNativePath],
# to enable hermes on iOS, change `false` to `true` and then install pods
:production => production,
:hermes_enabled => flags[:hermes_enabled],
:fabric_enabled => flags[:fabric_enabled],
#:flipper_configuration => FlipperConfiguration.enabled,
:flipper_configuration => FlipperConfiguration.enabled(["Release", "Debug"], { 'Flipper' => '0.127.0' }),
# An absolute path to your application root.
:app_path => "#{Pod::Config.instance.installation_root}/.."
)
After that run pod install to update the changes. I tested this in Intel & M1 mac's.

No podspec found for `React-Core` in `../node_modules/React`

First its not duplicated. Because i have different issue. I upgraded my react Native version to '0.62.2' (I wish I hadn't upgraded). I'm dealing with a lot of problems right now.This is my problem now No podspec found for React-Core in ../node_modules/React and I couldn't solve it
It is seen that there is always wrong path in similar problems. But even though I wrote the correct path, it gives an error. Also when I look at '../node_modules/react-native' I can't see the React-Core file here
[![enter image description here][1]][1]
I found similar problems and solutions. as in the examples below
No podspec found for `React-Core` in `../node_modules/react-native/React`
No podspec found for `React-Core` in `../node_modules/react-native`
pod install
Analyzing dependencies
Fetching podspec for DoubleConversion from ../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec
[!] No podspec found for React-Core in ../node_modules/React
Podfile
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'DGFonder' do
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
p
end
swift4 = ['Charts']
post_install do |installer|
installer.pods_project.targets.each do |target|
targets_to_ignore = %w(React yoga)
if targets_to_ignore.include? target.name
target.remove_from_project
end
target.build_configurations.each do |config|
if swift4.include?(target.name)
config.build_settings['SWIFT_VERSION'] = '4.1'
end
end
end
end
```
[1]: https://i.stack.imgur.com/NNLjD.png
React is now part of react-native in node_modules. So, you need to update your React-Core pod as:
pod 'React-Core', :path => '../node_modules/react-native/React'
Notice react-native in path specified.
I got the same issue this is because of node_modules
just do following steps
remove all node_modules
run npm i and check if there is any Vulnerabilities then perform npm audit fix
go to ios folder
run pod install
and it will work
i also face the same issue,
solution:-
you have updated git clone package
npm install
3.open path nodemodules/rn-fetch-blob
open rn-fetch-blob.podspec file
change React/native to React-native
cd ios && pod install
7.for android open android studio and then open your project android folder in android studio
8.for ios first go to ios folder of your project and then open RECA.xcworkspace
9.Run build in Xcode
Thanks

Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevSettings' could not be found

App get crashed with the above message. Unable to view my app screen.
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'DevSettings' could not be found. Verify that a module by this name is registered in the na..., stack:
platform :ios, '9.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'App' do
# Pods for App
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
#pod 'BVLinearGradient', :path => '../node_modules/react-native-linear-gradient'
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'rn-fetch-blob', :path => '../node_modules/rn-fetch-blob'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'react-native-cameraroll', :path => '../node_modules/#react-native-community/cameraroll'
target 'AppTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'App-tvOS' do
# Pods for App-tvOS
target 'App-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
I had the same error and the problem was that I built the app in Release mode but the main.jsbundle was dev mode.
Using react-native#0.61.5
I stopped the Metro process and run again
react-native run-ios --configuration Release --device --scheme="MyTargetScheme"
For us the issue was that we were (manually) building the RN bundle for our production app without setting the dev value in the react-native CLI.
When testing on simulator or device with a debug configuration in Xcode, this was not a problem. But since we archive for the App Store with a release config, we were seeing this crash in production.
The react-native bundle command has the --dev switch set to true by default. So the solution was simply to add --dev false to the bundle command.
In my case, my issue is resolved by node -v changes.
Initially I have used node 9.4.0 and then I have changed the node to 12.
Due to this version change the above error occurs.
So I have changed to node 9.4.0 and rebuild the app in release mode. It works fine
Any one know why the node version changes failed to bundle the app in release mode
In my specific situation, I was using a deprecated version of expo/ex-navigation , in RN 0.64.2 we had one problem, because RN doesn't understood the #2x.android or similars casts to choose the right image for an Icon. The problem is Described here : #31348.
I sold my conflicts locally inside node_modules and make Android work fine (then I forked and create a correction under my control), but when I came back to work in my IoS problems, I forgot to use this correction.
So, my problem was occurring in one lib i had in my node_modules, and as I extensively searched, this problems use to happen in this kind of situation.
So if #takameyer solution doesn't work as it doesn't to me, I suggest taker a look in your node_modules dependencies...
probably trying to build your bundle thought react-native-cli will give you an better log then building this in xcode, since in my case xcode build worked but give-me a run-time error(Release).
I hope it help someone in the future.
This crash reason is when your Target is Release Mode and your bundle is Development Mode.
So my iOS target was set to Release
And my bundle was build to Development, with this command :
react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --platform='ios' --assets-dest='./ios'
So to fix this, i build again my bundle with this command.
react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios' --assets-dest='./ios'
And works.
Thanks #sumizome and #strdr4605 i made this with your answers.

Can't install react-native-unimodules on React Native 0.60.3

Installed with yarn install react-native-unimodules
The next step in the instructions required me to edit my project Podfile. The necessary additions were shown here.
Here is my resultant Podfile
platform :ios, '10.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
require_relative '../node_modules/react-native-unimodules/cocoapods.rb'
target 'MyProjectName' do
# Pods for MyProjectName
pod 'React', :path => '../node_modules/react-native/', :subspecs => [
'Core',
'CxxBridge',
'DevSupport',
'RCTText',
'RCTNetwork',
'RCTWebSocket',
'RCTAnimation',
'RCTImage',
]
pod 'React-Core', :path => '../node_modules/react-native/React'
pod 'React-DevSupport', :path => '../node_modules/react-native/React'
pod 'React-fishhook', :path => '../node_modules/react-native/Libraries/fishhook'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTWebSocket', :path => '../node_modules/react-native/Libraries/WebSocket'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
use_unimodules!
target 'MyProjectNameTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'MyProjectName-tvOS' do
# Pods for MyProjectName-tvOS
target 'MyProjectName-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
The next step is running pod install, which gives the following output/error:
$ pod install
Installing unimodules:
expo-app-loader-provider#5.0.1 from ../node_modules/expo-app-loader-provider/ios
expo-constants#5.0.1 from ../node_modules/expo-constants/ios
expo-file-system#5.0.1 from ../node_modules/expo-file-system/ios
expo-permissions#5.0.1 from ../node_modules/expo-permissions/ios
unimodules-barcode-scanner-interface#2.0.1 from ../node_modules/unimodules-barcode-scanner-interface/ios
unimodules-camera-interface#2.0.1 from ../node_modules/unimodules-camera-interface/ios
unimodules-constants-interface#2.0.1 from ../node_modules/unimodules-constants-interface/ios
unimodules-core#2.0.1 from ../node_modules/#unimodules/core/ios
unimodules-face-detector-interface#2.0.1 from ../node_modules/unimodules-face-detector-interface/ios
unimodules-file-system-interface#2.0.1 from ../node_modules/unimodules-file-system-interface/ios
unimodules-font-interface#2.0.1 from ../node_modules/unimodules-font-interface/ios
unimodules-image-loader-interface#2.0.1 from ../node_modules/unimodules-image-loader-interface/ios
unimodules-permissions-interface#2.0.1 from ../node_modules/unimodules-permissions-interface/ios
unimodules-react-native-adapter#2.0.1 from ../node_modules/#unimodules/react-native-adapter/ios
unimodules-sensors-interface#2.0.1 from ../node_modules/unimodules-sensors-interface/ios
unimodules-task-manager-interface#2.0.1 from ../node_modules/unimodules-task-manager-interface/ios
Analyzing dependencies
Fetching podspec for `EXAppLoaderProvider` from `../node_modules/expo-app-loader-provider/ios`
Fetching podspec for `EXConstants` from `../node_modules/expo-constants/ios`
Fetching podspec for `EXFileSystem` from `../node_modules/expo-file-system/ios`
Fetching podspec for `EXPermissions` from `../node_modules/expo-permissions/ios`
Fetching podspec for `React-Core` from `../node_modules/react-native/React`
Fetching podspec for `React-DevSupport` from `../node_modules/react-native/React`
Fetching podspec for `React-RCTActionSheet` from `../node_modules/react-native/Libraries/ActionSheetIOS`
Fetching podspec for `React-RCTAnimation` from `../node_modules/react-native/Libraries/NativeAnimation`
Fetching podspec for `React-RCTBlob` from `../node_modules/react-native/Libraries/Blob`
Fetching podspec for `React-RCTImage` from `../node_modules/react-native/Libraries/Image`
Fetching podspec for `React-RCTLinking` from `../node_modules/react-native/Libraries/LinkingIOS`
Fetching podspec for `React-RCTNetwork` from `../node_modules/react-native/Libraries/Network`
Fetching podspec for `React-RCTSettings` from `../node_modules/react-native/Libraries/Settings`
Fetching podspec for `React-RCTText` from `../node_modules/react-native/Libraries/Text`
Fetching podspec for `React-RCTVibration` from `../node_modules/react-native/Libraries/Vibration`
Fetching podspec for `React-RCTWebSocket` from `../node_modules/react-native/Libraries/WebSocket`
Fetching podspec for `React-cxxreact` from `../node_modules/react-native/ReactCommon/cxxreact`
Fetching podspec for `React-fishhook` from `../node_modules/react-native/Libraries/fishhook`
Fetching podspec for `React-jsi` from `../node_modules/react-native/ReactCommon/jsi`
Fetching podspec for `React-jsiexecutor` from `../node_modules/react-native/ReactCommon/jsiexecutor`
Fetching podspec for `React-jsinspector` from `../node_modules/react-native/ReactCommon/jsinspector`
Fetching podspec for `React` from `../node_modules/react-native/`
Fetching podspec for `UMBarCodeScannerInterface` from `../node_modules/unimodules-barcode-scanner-interface/ios`
Fetching podspec for `UMCameraInterface` from `../node_modules/unimodules-camera-interface/ios`
Fetching podspec for `UMConstantsInterface` from `../node_modules/unimodules-constants-interface/ios`
Fetching podspec for `UMCore` from `../node_modules/#unimodules/core/ios`
Fetching podspec for `UMFaceDetectorInterface` from `../node_modules/unimodules-face-detector-interface/ios`
Fetching podspec for `UMFileSystemInterface` from `../node_modules/unimodules-file-system-interface/ios`
Fetching podspec for `UMFontInterface` from `../node_modules/unimodules-font-interface/ios`
Fetching podspec for `UMImageLoaderInterface` from `../node_modules/unimodules-image-loader-interface/ios`
Fetching podspec for `UMPermissionsInterface` from `../node_modules/unimodules-permissions-interface/ios`
Fetching podspec for `UMReactNativeAdapter` from `../node_modules/#unimodules/react-native-adapter/ios`
Fetching podspec for `UMSensorsInterface` from `../node_modules/unimodules-sensors-interface/ios`
Fetching podspec for `UMTaskManagerInterface` from `../node_modules/unimodules-task-manager-interface/ios`
Fetching podspec for `yoga` from `../node_modules/react-native/ReactCommon/yoga`
[!] CocoaPods could not find compatible versions for pod "React/Core":
In Podfile:
React/Core (from `../node_modules/react-native/`)
None of your spec sources contain a spec satisfying the dependency: `React/Core (from `../node_modules/react-native/`)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Note: as of CocoaPods 1.0, `pod repo update` does not happen on `pod install` by default.
Following the responses to a Github issue regarding this exact error output, I did a search of file contents for my entire project directory and did not get a hit for any place React-Core may be badly defined as React/Core.
This is my first time ever editing a Podfile, and I fear I may have fumbled something in the syntax.
React Native changed a lot of things in 0.60, one of them was to split React podspec into separate podspecs.
That means that React podspec no longer has any subspecs. The error you're getting is React/Core, which used to be a subspec, is no longer available (it's now imported separately). To fix the problem, remove the subspecs from your Podfile:
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/React'
etc...
Note that many tutorials and documentation you'll find on the web include the subspecs definitions. That's how things were done in React Native <=0.59, and are no longer valid in 0.60.
I guess podspec names changed: React-Core is not in sub folder it is in root folder. Here is my working pod file with React-Native 0.61.3:
# Uncomment the next line to define a global platform for your project
platform :ios, '10.0'
require_relative '../node_modules/#react-native-community/cli-platform-ios/native_modules'
target 'MyApp' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for MyApp
pod 'RNDeviceInfo', :path => '../node_modules/react-native-device-info'
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'ReactCommon', :path => '../node_modules/react-native/ReactCommon'
pod 'React-Core', :path => '../node_modules/react-native'
pod 'React', :path => '../node_modules/react-native'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
target 'MyAppTests' do
inherit! :search_paths
# Pods for testing
end
end

'React/RCTEventEmitter.h' file not found (CocoaPods)

I'm going back to a React Native project and getting the following build error:
'React/RCTEventEmitter.h' file not found
The project uses CocoaPods to bring in React and its dependencies. The error seems to be to do with a missing header in one of my custom modules. The specific line with the import error is at https://github.com/adamski/react-native-couchbase/blob/8bc089a1e4cfdf62599b1f156072aa12a3823b30/ios/RCTCouchBase/RCTCouchBase/RCTCouchBase.h#L8
The error only started to appear after adding a new node module and running pod install.
I've have tried various things to fix it such as:
Upgrading RN (from 0.51 to 0.55 and back again)
Deleting and reinstalling node_modules
Adding various paths to Header Search Paths. e.g. ${PODS_ROOT}/Headers/Public/React
Deleting Build folder
If I change the import to #import "RCTEventEmitter" it then falls over on:
'React/RCTBridge.h' file not found from RCTEventEmitter.h.
Anything else that could be going wrong here?
I recently had to upgrade to Xcode 10 for another project, perhaps that is an issue?
Podfile:
react_native_path = '../../node_modules/react-native'
install! 'cocoapods', :deterministic_uuids => false
platform :ios, '8.0'
target 'MyApp - App' do
pod 'HockeySDK', '~> 4.1.3'
pod 'React', :path => '../../node_modules/react-native', :subspecs => [
'ART',
'Core',
'RCTImage',
'RCTLinkingIOS',
'RCTNetwork',
'RCTText',
'RCTWebSocket',
'RCTAnimation',
'DevSupport',
'BatchedBridge',
# Add any other subspecs you want to use in your project
]
# To use CocoaPods with React Native, you need to add this specific Yoga spec as well
pod 'yoga', :path => react_native_path + '/ReactCommon/yoga'
pod 'couchbase-lite-ios', '~> 1.4.0'
pod 'couchbase-lite-ios/ForestDB', '~> 1.4.0'
pod 'mp3lame-for-ios'
pod 'ReactNativeCouchbase', :path => '../../node_modules/react-native-couchbase'
pod 'ReactNativeNavigation', :path => '../../node_modules/react-native-navigation'
pod 'RNVectorIcons', :path => '../../node_modules/react-native-vector-icons'
pod 'RNSVG', :path => '../../node_modules/react-native-svg'
pod 'RNDeviceInfo', :path => '../../node_modules/react-native-device-info'
pod 'react-native-in-app-utils', :path => '../../node_modules/react-native-in-app-utils'
pod 'react-native-mail', :path => '../../node_modules/react-native-mail'
pod 'BVLinearGradient', :path => '../../node_modules/react-native-linear-gradient'
pod 'RNSound', :path => '../../node_modules/react-native-sound'
pod 'react-native-youtube', :path => '../../node_modules/react-native-youtube'
pod 'RNStoreReview', :path => '../../node_modules/react-native-store-review/ios'
end