Invariant Violation: TurboModuleRegistry.getEnforcing RNLocalize

121 Views Asked by At

How do I make a library for the new architecture work on the old architecture RN 66.5 without downgrading the library since the last version has a required bug fix

I get this Invariant Violation: TurboModuleRegistry.getEnforcing RNLocalize.

I belive because the react-native-localize wants the new architecture or it might be the react native version (yarn.lock):

"react-native-localize@npm:^3.0.3":version: 3.0.3resolution: "react-native-localize@npm:3.0.3"peerDependencies:react: ">=18.1.0"react-native: ">=0.70.0"react-native-macos: ">=0.70.0"
yarn start --reset-cache

 ERROR  Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNLocalize' could not be found. Verify that a module by this name is registered in the native binary.
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.
 ERROR  Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication). A frequent cause of the error is that the application entry file path is incorrect.
      This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.

I tried npx react-native link react-native-localize

➜   npx react-native infoinfo Fetching system and libraries information...System:OS: macOS 14.0CPU: (10) arm64 Apple M2 ProMemory: 69.45 MB / 16.00 GBShell: 5.9 - /bin/zshBinaries:Node: 16.20.2 - ~/.nvm/versions/node/v16.20.2/bin/nodeYarn: 3.1.1 - /opt/homebrew/bin/yarnnpm: 8.19.4 - ~/.nvm/versions/node/v16.20.2/bin/npmWatchman: 2023.11.06.00 - /opt/homebrew/bin/watchmanManagers:CocoaPods: 1.12.1 - /usr/local/bin/podSDKs:iOS SDK:Platforms: DriverKit 23.0, iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0Android SDK: Not FoundIDEs:Android Studio: 2022.3 AI-223.8836.35.2231.11005911Xcode: 15.0/15A240d - /usr/bin/xcodebuildLanguages:Java: 11.0.20.1 - /opt/homebrew/opt/openjdk@11/bin/javacnpmPackages:@react-native-community/cli: Not Foundreact: 17.0.2 => 17.0.2react-native: 0.66.5 => 0.66.5react-native-macos: Not FoundnpmGlobalPackages:react-native: Not Found
0

There are 0 best solutions below