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

🔥 [🐛] Cannot find module './plugin/build' for app-check expo config plugin #7703

Closed moorekevin closed 6 months ago

moorekevin commented 6 months ago

Issue

Hi, I tried using the "@react-native-firebase/app-check" config plugin for Expo, but when I add it to my app.config.json under "plugins" it gives me an error Cannot find module './plugin/build'. I have installed it using npx expo install @react-native-firebase/app-check.

I think the error makes sense since the app-check plugin folder in node_modules does not have a build directory like @react-native-firebase/app for example does. But I have no idea how to make it create the build directory. I have tried reinstalling and uninstalling the app-check module and even deleting all node_modules

I'm using Expo Managed workflow (no iOS or Android directories). It works fine for "@react-native-firebase/app", and "@react-native-firebase/auth" plugins.


Project Files

Javascript

Click To Expand

#### `package.json`: ```json { "name": "xxx", "version": "1.0.0", "scripts": { "start": "expo start --dev-client", "android": "expo run:android", "ios": "expo run:ios", "web": "expo start --web", "eject": "expo eject", "check-dependencies": "rnx-align-deps", "fix-dependencies": "rnx-align-deps --write", "ts:check": "tsc" }, "dependencies": { "@expo-google-fonts/inter": "^0.2.3", "@expo-google-fonts/lato": "^0.2.3", "@expo-google-fonts/montserrat": "^0.2.3", "@expo/metro-config": "~0.17.1", "@react-native-firebase/app": "^19.1.0", "@react-native-firebase/app-check": "^19.1.0", "@react-native-firebase/auth": "^19.1.0", "@react-native-firebase/firestore": "^19.1.0", "@react-native-masked-view/masked-view": "0.3.0", "@react-navigation/bottom-tabs": "^6.2.0", "@react-navigation/native": "^6.0.8", "@react-navigation/native-stack": "^6.5.1", "@react-navigation/stack": "^6.1.1", "@types/react": "~18.2.14", "expo": "^50.0.14", "expo-av": "~13.10.5", "expo-blur": "~12.9.2", "expo-build-properties": "~0.11.1", "expo-clipboard": "~5.0.1", "expo-dev-client": "~3.3.11", "expo-device": "~5.9.3", "expo-font": "~11.10.3", "expo-google-fonts": "^0.0.0", "expo-notifications": "~0.27.6", "expo-splash-screen": "~0.26.4", "expo-status-bar": "~1.11.1", "expo-updates": "~0.24.12", "fuse.js": "^3.4.5", "libphonenumber-js": "^1.10.21", "lodash.isempty": "^4.4.0", "lodash.isequal": "^4.5.0", "node-emoji": "1.11.0", "react": "18.2.0", "react-async-hook": "^4.0.0", "react-dom": "18.2.0", "react-native": "0.73.6", "react-native-confirmation-code-field": "^7.3.0", "react-native-gesture-handler": "~2.14.0", "react-native-get-random-values": "~1.8.0", "react-native-inset-shadow": "^1.0.3", "react-native-pager-view": "6.2.3", "react-native-reanimated": "~3.6.2", "react-native-safe-area-context": "4.8.2", "react-native-screens": "~3.29.0", "react-native-svg": "14.1.0", "react-native-svg-transformer": "^1.0.0", "react-native-switch-toggle": "^2.2.1", "react-native-ui-lib": "^7.18.0", "react-navigation-tabbar-collection": "^1.0.0", "shader": "^1.0.0", "typescript": "^5.4.2", "uuid": "^9.0.1", "yargs": "^17.7.1" }, "devDependencies": { "@babel/core": "^7.24.0", "@rnx-kit/align-deps": "^2.2.1", "@types/lodash.isempty": "^4.4.9", "babel-plugin-module-resolver": "^5.0.0" }, "private": true, "rnx-kit": { "kitType": "app", "alignDeps": { "requirements": [ "react-native@0.70" ], "capabilities": [ "core", "core-android", "core-ios", "gestures", "masked-view", "navigation/native", "navigation/stack", "react", "react-dom", "safe-area", "screens", "svg" ] } } } ``` #### `firebase.json` for react-native-firebase v6: ```json # N/A ```

iOS

Click To Expand

#### `ios/Podfile`: - [x] I'm not using Pods - [ ] I'm using Pods and my Podfile looks like: ```ruby # N/A ``` #### `AppDelegate.m`: ```objc // N/A ```


Android

Click To Expand

#### Have you converted to AndroidX? - [ ] my application is an AndroidX application? - [ ] I am using `android/gradle.settings` `jetifier=true` for Android compatibility? - [ ] I am using the NPM package `jetifier` for react-native compatibility? #### `android/build.gradle`: ```groovy // N/A ``` #### `android/app/build.gradle`: ```groovy // N/A ``` #### `android/settings.gradle`: ```groovy // N/A ``` #### `MainApplication.java`: ```java // N/A ``` #### `AndroidManifest.xml`: ```xml ```


Environment

Click To Expand

**`react-native info` output:** ``` System: OS: macOS 14.4 CPU: (12) arm64 Apple M2 Pro Memory: 2.23 GB / 32.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 21.7.1 path: /opt/homebrew/bin/node Yarn: Not Found npm: version: 10.5.0 path: /opt/homebrew/bin/npm Watchman: version: 2024.01.22.00 path: /opt/homebrew/bin/watchman Managers: CocoaPods: version: 1.14.3 path: /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 23.4 - iOS 17.4 - macOS 14.4 - tvOS 17.4 - visionOS 1.1 - watchOS 10.4 Android SDK: Not Found IDEs: Android Studio: 2022.1 AI-221.6008.13.2211.9514443 Xcode: version: 15.3/15E204a path: /usr/bin/xcodebuild Languages: Java: version: 17.0.2 path: /Users/kevinmoore/.jenv/shims/javac Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.6 wanted: 0.73.6 react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: Not found newArchEnabled: Not found iOS: hermesEnabled: Not found newArchEnabled: Not found ``` - **Platform that you're experiencing the issue on**: - [ ] iOS - [ ] Android - [ ] **iOS** but have not tested behavior on Android - [ ] **Android** but have not tested behavior on iOS - [x] Both - **`react-native-firebase` version you're using that has this issue:** - 19.1.0 - **`Firebase` module(s) you're using that has the issue:** - AppCheck - **Are you using `TypeScript`?** - `Y' 'v5.4.2'


moorekevin commented 6 months ago

I see that there is a PR addressing this here https://github.com/invertase/react-native-firebase/pull/7704

mikehardy commented 6 months ago

Indeed - sorry for the slightly rough landing on this config plugin, that PR is running through tests now and I'll merge+release if/when it passes