You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a brownfield React Native setup where I have enabled New Architecture and am now trying to write a Turbo Native Module as per the official documentation. However, I am encountering the following error when launching the React Fragment:
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'NativeLocalStorage' could not be found.
Verify that a module by this name is registered in the native binary.
Project Structure
I have a multi-module Android project structured as follows:
But the problem with the solution provided by Nicola Corti is (although it works) it adds a @private/react-native-feature in node_modules and move all the Android integration code written in feature/react into $rootProject/reactNative/@node_modules/@private/react-native-feature but my Actual project has tons of feature module which depends on feature/react module and some of the class are auto generated using dependency injection that relies on code written in feature/react, using this solution doesn't work
Help Needed
✅ Is there any changes needed in my brownfield setup for android multi-module project?
✅ How can I correctly register my Turbo Native Module within a multi-module Android project?
The text was updated successfully, but these errors were encountered:
Description
I have a brownfield React Native setup where I have enabled New Architecture and am now trying to write a Turbo Native Module as per the official documentation. However, I am encountering the following error when launching the React Fragment:
Project Structure
I have a multi-module Android project structured as follows:
Reproducible Example
A minimal, reproducible example is available in this repository:
🔗 GitHub Repo
Steps to Reproduce
Solution provided by Facebook team @cortinico
I raised this same issue facebook/react-native#49246 and @cortinico provided the solution here -> facebook/react-native#49246 (comment)
But the problem with the solution provided by Nicola Corti is (although it works) it adds a
@private/react-native-feature
innode_modules
and move all the Android integration code written infeature/react
into$rootProject/reactNative/@node_modules/@private/react-native-feature
but my Actual project has tons of feature module which depends onfeature/react
module and some of the class are auto generated using dependency injection that relies on code written infeature/react
, using this solution doesn't workHelp Needed
✅ Is there any changes needed in my brownfield setup for android multi-module project?
✅ How can I correctly register my Turbo Native Module within a multi-module Android project?
The text was updated successfully, but these errors were encountered: