Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16552

React-Native: React could not be found within project or in these directories

$
0
0

We have upgraded our react native project to the latest react native version (v0.61.2) with react (16.9.0) and it works perfectly fine on android. When we try to run it on ios thought, we get the message:

warning: the transform cache was reset. Loading dependency graph, done. error: bundling failed: Error: 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

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules: rm -rf node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*

We have followed the upgrade guide, updated all dependencies to their latest version and updated the pods. I actually don't know where or how to start debugging this, since this seems to be coming from the Pods folder.

This is the content of our Pods folder:

ls ios/Pods/
Adjust              GoogleDataTransport
Crashlytics         GoogleDataTransportCCTSupport
DoubleConversion        GoogleUtilities
Fabric              Headers
Firebase            Local Podspecs
FirebaseABTesting       Manifest.lock
FirebaseAnalytics       Pods.xcodeproj
FirebaseAnalyticsInterop    Protobuf
FirebaseCore            Pushwoosh
FirebaseCoreDiagnostics     PushwooshInboxUI
FirebaseCoreDiagnosticsInterop  React
FirebaseDynamicLinks        Target Support Files
FirebaseInstanceID      boost-for-react-native
FirebaseRemoteConfig        glog
Folly               nanopb
GoogleAppMeasurement

and in our node_modules folder, we have (with a lot more other packages):

...
react
depd                        react-deep-force-update
des.js                      react-devtools-core
destroy                     react-is
detect-libc                 react-lifecycles-compat
detect-newline              react-native
...

I have, of course, tried all the steps, like clearing caches, reset-cache, clearing DerivedData, Clean and build, ... I don't know where to start looking.


Viewing all articles
Browse latest Browse all 16552

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>