Detached iOS app will not compile - JSIndexedRAMBundleRegistry error - Any ideas?

#1

I have created a large app using expo and have decided to detach to support payment processing.

It was running fine till I detached.

I followed the instructions, exp detach, pods install, then opened the project in xcode. I’m getting 3 errors:

Base class ‘facebook::react::RAMBundleRegistry’ has private constructor(JSIndexedRAMBundleRegistry.cpp)
Use of undeclared identifier ‘jsBundlesDir’ ((JSIndexedRAMBundleRegistry.cpp)
‘bundleById’ marked ‘override’ but does not override any member functions (JSIndexedRAMBundleRegistry.h)

I am using version 25.0.0 of expo and the latest 2.3.3 of ExpoKit.

Any ideas on where to look to fix this? It seems unlikely there’s a problem with react-native, yet thats where the error seems to be.

{
  "name": "xxxxxxxxxxxxxx",
  "version": "1.0.1",
  "description": "xxxxxxxxxxxxxx",
  "author": "xxxxxxxxxxxxx",
  "license": "UNLICENSED",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "test": "node ./node_modules/jest/bin/jest.js --watch"
  },
  "jest": {
    "preset": "jest-expo"
  },
  "dependencies": {
    "buffer": "^5.0.8",
    "expo": "^25.0.0",
    "expo-analytics": "^1.0.6",
    "mobx": "^3.4.1",
    "mobx-react": "^4.2.2",
    "react": "16.2.0",
    "react-native": "https://github.com/expo/react-native/archive/sdk-25.0.0.tar.gz",
    "react-native-animatable": "^1.2.4",
    "react-native-cache": "^1.0.3",
    "react-native-easy-toast": "^1.0.9",
    "react-native-elements": "^0.16.0",
    "react-native-keyboard-spacer": "^0.4.1",
    "react-native-photo-browser": "^0.4.0",
    "react-native-popup-menu": "^0.12.2",
    "react-native-swiper": "^1.5.13",
    "react-native-timer": "^1.3.1",
    "react-native-vector-icons": "^4.3.0",
    "react-navigation": "^1.0.3",
    "url": "^0.11.0",
    "util": "^0.10.3",
    "wpapi": "^1.1.2"
  },
  "devDependencies": {
    "eslint-plugin-react": "^7.5.1",
    "jest-expo": "^25.0.0"
  }
}
#2

Those are part of react-native’s cxx bridge, but I suspect there’s something off in how the project is set up.
I’d go over https://docs.expo.io/versions/latest/guides/expokit.html#setting-up-your-project carefully and make sure you got everything in the right order. Some common mistakes are using the wrong RN version or opening xcodeproj instead of xcworkspace.

#3

Thanks so much for the reply. I have been over the instructions (and redone the detatch) over 5 times now.
I’ll add the package.json incase there’s something obvious people can see that I’m missing.

#4

I’ve built an empty project from scratch. (I made the package.json files identical so they had the same dependencies) This works. My original project doesn’t.
Doing a diff I can see the “Podfile” file is identical for both projects, yet the pods folder has differences. (The differences being the files that cause the compile errors)

Anyone with knowledge of pod install and how it works?

Only in the-recipe-app/ios/Pods/Headers/Private/React: JSIndexedRAMBundleRegistry.h
Only in the-recipe-app/ios/Pods/Headers/Private/React: RCTPackagerConnectionBridgeConfig.h
Only in the-recipe-app/ios/Pods/Headers/Private/React: RCTPackagerConnectionConfig.h
Only in the-recipe-app/ios/Pods/Headers/Private/React: RCTReloadPackagerMethod.h
Only in the-recipe-app/ios/Pods/Headers/Private/React: RCTSamplingProfilerPackagerMethod.h
Only in the-recipe-app/ios/Pods/Headers/Private/React/React: RCTJSEnvironment.h
Only in the-recipe-app/ios/Pods/Headers/Private/yoga: YGNodeList.h
Only in the-recipe-app/ios/Pods/Headers/Public/React: RCTPackagerConnectionBridgeConfig.h
Only in the-recipe-app/ios/Pods/Headers/Public/React: RCTPackagerConnectionConfig.h
Only in the-recipe-app/ios/Pods/Headers/Public/React: RCTReloadPackagerMethod.h
Only in the-recipe-app/ios/Pods/Headers/Public/React: RCTSamplingProfilerPackagerMethod.h
Only in the-recipe-app/ios/Pods/Headers/Public/React/React: RCTJSEnvironment.h
Only in the-recipe-app/ios/Pods/Headers/Public/yoga: YGNodeList.h
Files my-new-project/ios/Pods/Manifest.lock and the-recipe-app/ios/Pods/Manifest.lock differ
Files my-new-project/ios/Pods/Pods.xcodeproj/project.pbxproj and the-recipe-app/ios/Pods/Pods.xcodeproj/project.pbxproj differ
Only in the-recipe-app/ios/Pods/Pods.xcodeproj/xcuserdata/julian.xcuserdatad/xcschemes: Pods-clean-eating.xcscheme
Only in my-new-project/ios/Pods/Pods.xcodeproj/xcuserdata/julian.xcuserdatad/xcschemes: Pods-my-new-project.xcscheme
Files my-new-project/ios/Pods/Pods.xcodeproj/xcuserdata/julian.xcuserdatad/xcschemes/React.xcscheme and the-recipe-app/ios/Pods/Pods.xcodeproj/xcuserdata/julian.xcuserdatad/xcschemes/React.xcscheme differ
Files my-new-project/ios/Pods/Pods.xcodeproj/xcuserdata/julian.xcuserdatad/xcschemes/xcschememanagement.plist and the-recipe-app/ios/Pods/Pods.xcodeproj/xcuserdata/julian.xcuserdatad/xcschemes/xcschememanagement.plist differ
Files my-new-project/ios/Pods/Pods.xcodeproj/xcuserdata/julian.xcuserdatad/xcschemes/yoga.xcscheme and the-recipe-app/ios/Pods/Pods.xcodeproj/xcuserdata/julian.xcuserdatad/xcschemes/yoga.xcscheme differ
Only in the-recipe-app/ios/Pods/Target Support Files: Pods-clean-eating
Only in my-new-project/ios/Pods/Target Support Files: Pods-my-new-project
#5

The problem was that there was leftover files in the node_modules from previous versions of react native. Not a problem when running Expo normally, but when compiling “pod install” merrily picks them up and tries compiling them. Sad.

So, if you have suffered as I have, here is “the fix”:

  1. Delete your javascript packages ( rm node_modules)
  2. Install your packages (yarn (or npm install))
  3. Go into ios folder and run “pod install”

Thanks to @etc again for at least attempting to help. :sweat_smile:

closed #6

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.