Useful or not, from you.
react-native Unable to resolve Module 'React' after upgrading to 0.61.4

I am getting this issue after upgrading to 0.61.4 in ios Unable to resolve module React from ios/Pods/React/Libraries/react-native/react-native.js: React could not be found within the project or in these directories: node_modules

I tried npm start -- -- reset-cache, clearing derived data. clean project etc. tried replacing var ReactNative = Object.assign(Object.create(require('React')), { with var ReactNative = Object.assign(Object.create(require('react')), { in /ios/Pods/React/Libraries/react-native/react-native.js

But the issue exists in the file react-native.js

image

React Native version: System: OS: macOS Mojave 10.14.4 CPU: (4) x64 Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz Memory: 172.62 MB / 8.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.0 - /usr/local/bin/node Yarn: 1.19.1 - /usr/local/bin/yarn npm: 6.11.3 - /usr/local/bin/npm SDKs: iOS SDK: Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1 IDEs: Xcode: 11.2/11B52 - /usr/bin/xcodebuild npmPackages: react: 16.9.0 => 16.9.0 react-native: ^0.61.4 => 0.61.4 npmGlobalPackages: react-native-cli: 2.0.1

Steps To Reproduce

  1. Run project from Xcode
  2. The app starts with this red screen with error

<!-- Issues without reproduction steps or code are likely to stall. -->

<!-- Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve. -- -->

That's a useful answer
Without any help

Oh, I see it now. Metro tries to resolve ios/Pods/React/Libraries/react-native/react-native.js but there shouldn't be React pod in your pods, it should be taken from node_modules.

Remove ios/Pods and run pod install again. Also make sure your Podfile is valid and looks like this one: https://github.com/facebook/react-native/blob/0.61-stable/template/ios/Podfile