Podfile breaks Android build

I’m trying to add Firebase to both Android and iOS. With Android everything went smoothly, but I have no luck with the iOS.

When I run pod install the installation succeeds, after that also react-native run-ios build succeeds, but when I try to open the app it immediately closes, and there is an error in the packager:

error: bundling failed: "Unable to resolve module `ReactNativeART` from `/Users/username/projectname/node_modules/react-native/Libraries/react-native/react-native-implementation.js`: Module does not exist in the module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: `watchman watch-del-all`.
2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`."

The same error was shown also if tried to build for Android.

I tried to comment out get ART() { return require('ReactNativeART'); }, and then it returned the same error only for DatePickerIOS module.

After a while I found out that the Pods folder was messing everything up. When I deleted the Pods folder, I could run react-native run-android again.
Does someone have any idea what could be the problem?

Environment

  1. Target Platform (e.g. iOS, Android): iOS and Android
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS El Capitan
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Xcode 8.0
  4. React Native version (e.g. 0.45.1): 0.46.4
  5. RNFirebase Version (e.g. 2.0.2): ^2.0.4

Author: Fantashit

1 thought on “Podfile breaks Android build

Comments are closed.

Podfile breaks Android build

I’m trying to add Firebase to both Android and iOS. With Android everything went smoothly, but I have no luck with the iOS.

When I run pod install the installation succeeds, after that also react-native run-ios build succeeds, but when I try to open the app it immediately closes, and there is an error in the packager:

error: bundling failed: "Unable to resolve module `ReactNativeART` from `/Users/username/projectname/node_modules/react-native/Libraries/react-native/react-native-implementation.js`: Module does not exist in the module map

This might be related to https://github.com/facebook/react-native/issues/4968
To resolve try the following:
1. Clear watchman watches: `watchman watch-del-all`.
2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.
3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`."

The same error was shown also if tried to build for Android.

I tried to comment out get ART() { return require('ReactNativeART'); }, and then it returned the same error only for DatePickerIOS module.

After a while I found out that the Pods folder was messing everything up. When I deleted the Pods folder, I could run react-native run-android again.
Does someone have any idea what could be the problem?

Environment

  1. Target Platform (e.g. iOS, Android): iOS and Android
  2. Development Operating System (e.g. macOS Sierra, Windows 10): macOS El Capitan
  3. Build tools (Xcode or Android Studio version, iOS or Android SDK version, if relevant): Xcode 8.0
  4. React Native version (e.g. 0.45.1): 0.46.4
  5. RNFirebase Version (e.g. 2.0.2): ^2.0.4

Author: Fantashit

1 thought on “Podfile breaks Android build

Comments are closed.