Issue
I have a project set up with bun and a monorepo structure, with the RN expo app in a sub-directory. When working with bun workspaces the package install linker uses an isolated install strategy. Modifying the bunfig.toml settings to include hoisted linker settings solves the issue, but at the cost of no longer being able to use isolated installs.
[install]
linker = "hoisted"
When expo prebuild is run the following failure is seen during the pod install phase.
⚠️ Something went wrong running `pod install` in the `ios` directory.
Command `pod install` failed.
└─ Cause: Invalid `Podfile` file:
[!] Invalid `RNFBMessaging.podspec` file: No such file or directory @ rb_sysopen - ../app/package.json.
# from [monorepo root]/node_modules/.bun/@react-native-firebase+messaging@23.8.8/node_modules/@react-native-firebase/messaging/RNFBMessaging.podspec:3
# -------------------------------------------
# package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
> appPackage = JSON.parse(File.read(File.join('..', 'app', 'package.json')))
#
# -------------------------------------------
.
# from [monorepo root]/apps/[subdirectory]/ios/Podfile:49
# -------------------------------------------
# # @generated end react-native-maps
> config = use_native_modules!(config_command)
#
# -------------------------------------------
I believe this is due to the linking present between the node_modules folder in the app directory and the root directory. The appPackage file can't be located due to the relative path used to resolve the location of the file.
Project Files
Javascript
Click To Expand
package.json:
{
"name": "expoapp",
"version": "1.0.0",
"main": "index.ts",
"scripts": {
"dev": "expo start",
"android": "expo run:android",
"ios": "expo run:ios",
"lint": "eslint --ext js,ts,tsx .",
"test": "jest",
"prebuild": "expo prebuild --clean"
},
"dependencies": {
"@react-native-async-storage/async-storage": "2.2.0",
"@react-native-firebase/app": "^23.8.8",
"@react-native-firebase/messaging": "^23.8.8",
"expo": "~55.0.8",
"expo-build-properties": "~55.0.10",
"expo-constants": "~55.0.9",
"expo-dev-client": "~55.0.18",
"expo-linking": "~55.0.8",
"expo-notifications": "~55.0.14",
"expo-router": "~55.0.7",
"expo-status-bar": "~55.0.4",
"react": "19.2.4",
"react-dom": "19.2.0",
"react-native": "0.83.2",
"react-native-safe-area-context": "~5.6.2"
},
"devDependencies": {
"@types/react": "~19.2.2",
"typescript": "~5.9.2"
},
"private": true
}
firebase.json for react-native-firebase v6:
iOS
Click To Expand
ios/Podfile:
AppDelegate.m:
Android
Click To Expand
Have you converted to AndroidX?
android/build.gradle:
android/app/build.gradle:
android/settings.gradle:
MainApplication.java:
AndroidManifest.xml:
Environment
Click To Expand
react-native info output:
I would include this, but I'm using expo and bun, and the result of that command is somewhat broken with this combo.
- Platform that you're experiencing the issue on:
react-native-firebase version you're using that has this issue:
Firebase module(s) you're using that has the issue:
- Are you using
TypeScript?
Issue
I have a project set up with bun and a monorepo structure, with the RN expo app in a sub-directory. When working with bun workspaces the package install linker uses an isolated install strategy. Modifying the
bunfig.tomlsettings to include hoisted linker settings solves the issue, but at the cost of no longer being able to use isolated installs.When
expo prebuildis run the following failure is seen during thepod installphase.I believe this is due to the linking present between the node_modules folder in the app directory and the root directory. The
appPackagefile can't be located due to the relative path used to resolve the location of the file.Project Files
Javascript
Click To Expand
package.json:{ "name": "expoapp", "version": "1.0.0", "main": "index.ts", "scripts": { "dev": "expo start", "android": "expo run:android", "ios": "expo run:ios", "lint": "eslint --ext js,ts,tsx .", "test": "jest", "prebuild": "expo prebuild --clean" }, "dependencies": { "@react-native-async-storage/async-storage": "2.2.0", "@react-native-firebase/app": "^23.8.8", "@react-native-firebase/messaging": "^23.8.8", "expo": "~55.0.8", "expo-build-properties": "~55.0.10", "expo-constants": "~55.0.9", "expo-dev-client": "~55.0.18", "expo-linking": "~55.0.8", "expo-notifications": "~55.0.14", "expo-router": "~55.0.7", "expo-status-bar": "~55.0.4", "react": "19.2.4", "react-dom": "19.2.0", "react-native": "0.83.2", "react-native-safe-area-context": "~5.6.2" }, "devDependencies": { "@types/react": "~19.2.2", "typescript": "~5.9.2" }, "private": true }firebase.jsonfor react-native-firebase v6:# N/AiOS
Click To Expand
ios/Podfile:# N/AAppDelegate.m:// N/AAndroid
Click To Expand
Have you converted to AndroidX?
android/gradle.settingsjetifier=truefor Android compatibility?jetifierfor react-native compatibility?android/build.gradle:// N/Aandroid/app/build.gradle:// N/Aandroid/settings.gradle:// N/AMainApplication.java:// N/AAndroidManifest.xml:<!-- N/A -->Environment
Click To Expand
react-native infooutput:react-native-firebaseversion you're using that has this issue:23.8.8Firebasemodule(s) you're using that has the issue:e.g. Instance IDTypeScript?Y&5.9.2