Error with eas build: TypeError: _reactNative.UIManager.getViewManagerConfig is not a function
I'm using the following:
"expo": "~53.0.20"- "react-native": "0.79.5"
- "react-native-purchases": "^9.2.2",
- "react-native-purchases-ui": "^9.2.2"
When running eas build on --profile production I'm getting the following error: TypeError: _reactNative.UIManager.getViewManagerConfig is not a function
production build bundles the javascript using this command: npx expo export:embed --eager --platform android --dev false
Here's the full error:
TypeError: _reactNative.UIManager.getViewManagerConfig is not a function
TypeError: _reactNative.UIManager.getViewManagerConfig is not a function
at factory (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\react-native-purchases-ui\lib\commonjs\index.js:130:59)
at loadModuleImplementation (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:285:5)
at guardedLoadModule (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:190:12)
at require (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:98:7)
at factory (C:\Users\Robert\Documents\codes\demo-ai\mobile\contexts\RevenueCatContext.tsx:5:1)
at loadModuleImplementation (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:285:5)
at guardedLoadModule (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:190:12)
at require (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:98:7)
at factory (C:\Users\Robert\Documents\codes\demo-ai\mobile\app\_layout.tsx:11:1)
at loadModuleImplementation (C:\Users\Robert\Documents\codes\demo-ai\mobile\node_modules\metro-runtime\src\polyfills\require.js:285:5)`
I click the stackerror and it points to this:
const InternalCustomerCenterView = _reactNative.UIManager.getViewManagerConfig('CustomerCenterView') != null ? (0, _reactNative.requireNativeComponent)('CustomerCenterView') : () => {
throw new Error(LINKING_ERROR);
};
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
Hi @doppelgunner, Is this only adding the RevenueCat SDK or are you seeing it when calling certain functions?
Im having the same issue,
Im only calling the RevenueCatUI.presentPaywallIfNeeded({ requiredEntitlementIdentifier: "pro" }); function and configured the purchases correctly.
hey! are you able to reproduce it in the latest SDK version?