invertase / react-native-firebase

🔥 A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.64k stars 2.21k forks source link

Unable to resolve module #1065

Closed giladno closed 6 years ago

giladno commented 6 years ago

I'm a bit lost here, I receive the following error while trying to build an android project (same happens when trying to build iOS).

Unable to resolve module `../functions` from `/Users/gilad/Code/TestProject/node_modules/react-native-firebase/dist/modules/core/firebase.js`: The module `../functions` could not be found from `/Users/gilad/Code/TestProject/node_modules/react-native-firebase/dist/modules/core/firebase.js`. Indeed, none of these files exist:

  * `/Users/gilad/Code/TestProject/node_modules/react-native-firebase/dist/modules/functions(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)`
  * `/Users/gilad/Code/TestProject/node_modules/react-native-firebase/dist/modules/functions/index(.native||.android.js|.native.js|.js|.android.json|.native.json|.json)`

As for my structure:

~/Code/TestProject/node_modules/react-native-firebase/dist/modules$ find .

.
./database
./database/transaction.js
./database/DataSnapshot.js.flow
./database/OnDisconnect.js.flow
./database/Query.js
./database/index.js
./database/index.js.flow
./database/DataSnapshot.js
./database/Query.js.flow
./database/OnDisconnect.js
./database/Reference.js
./database/transaction.js.flow
./database/Reference.js.flow
./crashlytics
./crashlytics/index.js
./crashlytics/index.js.flow
./core
./core/firebase.js.flow
./core/app.js.flow
./core/firebase.js
./core/app.js
./firestore
./firestore/QuerySnapshot.js
./firestore/Transaction.js
./firestore/types.js
./firestore/DocumentChange.js.flow
./firestore/WriteBatch.js.flow
./firestore/GeoPoint.js
./firestore/FieldPath.js.flow
./firestore/TransactionHandler.js.flow
./firestore/DocumentChange.js
./firestore/Query.js
./firestore/index.js
./firestore/TransactionHandler.js
./firestore/utils
./firestore/utils/serialize.js
./firestore/utils/index.js
./firestore/utils/index.js.flow
./firestore/utils/serialize.js.flow
./firestore/DocumentSnapshot.js
./firestore/Path.js.flow
./firestore/index.js.flow
./firestore/Blob.js.flow
./firestore/FieldValue.js.flow
./firestore/Query.js.flow
./firestore/WriteBatch.js
./firestore/CollectionReference.js.flow
./firestore/Blob.js
./firestore/Path.js
./firestore/DocumentSnapshot.js.flow
./firestore/DocumentReference.js
./firestore/CollectionReference.js
./firestore/QuerySnapshot.js.flow
./firestore/FieldValue.js
./firestore/GeoPoint.js.flow
./firestore/DocumentReference.js.flow
./firestore/Transaction.js.flow
./firestore/types.js.flow
./firestore/FieldPath.js
./config
./config/index.js
./config/index.js.flow
./auth
./auth/types.js
./auth/User.js
./auth/providers
./auth/providers/EmailAuthProvider.js.flow
./auth/providers/EmailAuthProvider.js
./auth/providers/FacebookAuthProvider.js.flow
./auth/providers/OAuthProvider.js
./auth/providers/GoogleAuthProvider.js
./auth/providers/FacebookAuthProvider.js
./auth/providers/TwitterAuthProvider.js
./auth/providers/OAuthProvider.js.flow
./auth/providers/TwitterAuthProvider.js.flow
./auth/providers/PhoneAuthProvider.js
./auth/providers/GithubAuthProvider.js
./auth/providers/GoogleAuthProvider.js.flow
./auth/providers/PhoneAuthProvider.js.flow
./auth/providers/GithubAuthProvider.js.flow
./auth/index.js
./auth/index.js.flow
./auth/User.js.flow
./auth/phone
./auth/phone/PhoneAuthListener.js
./auth/phone/ConfirmationResult.js.flow
./auth/phone/PhoneAuthListener.js.flow
./auth/phone/ConfirmationResult.js
./auth/types.js.flow
./admob
./admob/RewardedVideo.js.flow
./admob/Interstitial.js
./admob/Banner.js.flow
./admob/AdMobComponent.js.flow
./admob/AdMobComponent.js
./admob/VideoOptions.js
./admob/NativeExpress.js
./admob/AdRequest.js
./admob/RewardedVideo.js
./admob/index.js
./admob/VideoOptions.js.flow
./admob/Interstitial.js.flow
./admob/index.js.flow
./admob/Banner.js
./admob/NativeExpress.js.flow
./admob/AdRequest.js.flow
./admob/EventTypes.js
./admob/EventTypes.js.flow
./utils
./utils/index.js
./utils/index.js.flow
./crash
./crash/index.js
./crash/index.js.flow
./iid
./iid/index.js
./iid/index.js.flow
./storage
./storage/task.js.flow
./storage/task.js
./storage/index.js
./storage/index.js.flow
./storage/reference.js
./storage/reference.js.flow
./links
./links/IOSParameters.js
./links/AnalyticsParameters.js
./links/NavigationParameters.js
./links/AndroidParameters.js.flow
./links/types.js
./links/index.js
./links/SocialParameters.js
./links/ITunesParameters.js.flow
./links/DynamicLink.js.flow
./links/index.js.flow
./links/AnalyticsParameters.js.flow
./links/NavigationParameters.js.flow
./links/ITunesParameters.js
./links/SocialParameters.js.flow
./links/types.js.flow
./links/DynamicLink.js
./links/AndroidParameters.js
./links/IOSParameters.js.flow
./functions
./functions/HttpsError.js.flow
./functions/index.js
./functions/HttpsError.js
./functions/index.js.flow
./functions/types.flow.js.flow
./functions/types.flow.js
./invites
./invites/Invitation.js.flow
./invites/types.js
./invites/AndroidInvitation.js.flow
./invites/index.js
./invites/AndroidInvitation.js
./invites/index.js.flow
./invites/Invitation.js
./invites/types.js.flow
./perf
./perf/Trace.js
./perf/index.js
./perf/index.js.flow
./perf/Trace.js.flow
./messaging
./messaging/RemoteMessage.js.flow
./messaging/RemoteMessage.js
./messaging/types.js
./messaging/index.js
./messaging/index.js.flow
./messaging/types.js.flow
./notifications
./notifications/AndroidChannelGroup.js.flow
./notifications/AndroidAction.js
./notifications/Notification.js
./notifications/AndroidChannelGroup.js
./notifications/types.js
./notifications/AndroidNotification.js.flow
./notifications/IOSNotification.js.flow
./notifications/AndroidNotification.js
./notifications/index.js
./notifications/AndroidNotifications.js.flow
./notifications/Notification.js.flow
./notifications/AndroidRemoteInput.js.flow
./notifications/index.js.flow
./notifications/AndroidRemoteInput.js
./notifications/AndroidChannel.js
./notifications/IOSNotification.js
./notifications/AndroidAction.js.flow
./notifications/AndroidNotifications.js
./notifications/AndroidChannel.js.flow
./notifications/types.js.flow
./analytics
./analytics/index.js
./analytics/index.js.flow

All files are there, even tried to remove node_modules and reinstall. not sure how to proceed :(

giladno commented 6 years ago

Problem solved, my bad!

I had a local rn-cli.config.js with the following line:

    getBlacklistRE() {
        return blacklist([/react-native\/local-cli\/core\/__fixtures__.*/, /functions(_src)?\/.*/]);
    },

:)