[] Pod install fails when using monorepo structure in bun
Author: TabithaLarkinCreated Apr 3, 2026Updated Apr 14, 2026
Labelstype: bugNeeds Attention
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/@[email protected]/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 Expandpackage.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:
# N/AiOS
Click To Expandios/Podfile:
- I'm not using Pods
- I'm using Pods and my Podfile looks like:
# N/AAppDelegate.m:
// N/AAndroid
Click To ExpandHave you converted to AndroidX?
- my application is an AndroidX application?
- I am using
android/gradle.settingsjetifier=truefor Android compatibility? - I am using the NPM package
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 Expandreact-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:
- iOS
- Android
- iOS but have not tested behavior on Android
- Android but have not tested behavior on iOS
- Both
react-native-firebaseversion you're using that has this issue:23.8.8
Firebasemodule(s) you're using that has the issue:e.g. Instance ID
- Are you using
TypeScript?Y&5.9.2
Source: invertase/react-native-firebase