RNLocalize Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNLocalize' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: false
ReiDx opened this issue · 8 comments
Before submitting a new issue
- I tested using the latest version of the library, as the bug might be already fixed.
- I tested using a supported version of react native.
- I checked for possible duplicate issues, with possible answers.
Bug summary
Even though I integrated it into my project as stated below, I encounter the error shown. I also do manual linking. I get this error when I run it on iOS.
Main.tsx Code
`import * as RNLocalize from "react-native-localize";
export default function Main() {
useEffect(() => {
console.log(RNLocalize.getLocales());
console.log(RNLocalize.getCurrencies());
}, []);
`
Console Error
Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'RNLocalize' could not be found. Verify that a module by this name is registered in the native binary.Bridgeless mode: false. TurboModule interop: false. Modules loaded: {"NativeModules":["PlatformConstants","LogBox","Timing","AppState","SourceCode","BlobModule","WebSocketModule","SettingsManager","DevSettings","RedBox","Networking","Appearance","DevLoadingView","UIManager","DeviceInfo","NativeAnimatedModule","ImageLoader","LinkingManager","I18nManager","RNCSafeAreaContext"],"TurboModules":[],"NotFound":["NativePerformanceCxx","NativePerformanceObserverCxx","BugReporting","HeadlessJsTaskSupport","SoundManager","RNVectorIcons","IntentAndroid","RNSModule","RNLocalize"]}, js engine: hermes
Render Error
Cannot read property 'getLocales' of undefined
Library version
3.1.0
Environment info
System:
OS: macOS 14.1.1
CPU: (12) arm64 Apple M2 Pro
Memory: 62.38 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 21.7.3
path: /opt/homebrew/bin/node
Yarn: Not Found
npm:
version: 10.5.2
path: ~/Desktop/ReactProjects/KonumTakip/node_modules/.bin/npm
Watchman:
version: 2024.04.15.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 23.4
- iOS 17.4
- macOS 14.4
- tvOS 17.4
- visionOS 1.1
- watchOS 10.4
Android SDK: Not Found
IDEs:
Android Studio: 2023.2 AI-232.10300.40.2321.11567975
Xcode:
version: 15.3/15E204a
path: /usr/bin/xcodebuild
Languages:
Java: Not Found
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.73.7
wanted: 0.73.7
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: true
newArchEnabled: false
Steps to reproduce
- I tried the issue only for iOS.
- My expectation was that it would work smoothly for both.
Reproducible sample code
console.log(RNLocalize.getLocales());
console.log(RNLocalize.getCurrencies());
No issue on my side (the example app is also using react-native 0.73), might be a cache issue.
- Delete your
ios/build
directory - Delete the content of your
DerivedData
directory (https://stackoverflow.com/a/18933382/5529224) - Reinstall pods with
pod install
, rebuild - Rerun the bundler with
--reset-cache
No response here, I'm closing this.
same error in react native 0.64
same error in react native 0.64
React Native 0.64 is unsupported for quite a while now. Update or use an old version of the library.
same error in react native 0.64
React Native 0.64 is unsupported for quite a while now. Update or use an old version of the library.
Yes i checked in release section and found library v3 support react native minimum 0.70.
I downgrade library working and now works well.
@zoontek I am having the same issue in ubuntu 22.04 for android using expo Go
react-native info gives following output
System:
OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
CPU: (16) x64 AMD Ryzen 7 5800H with Radeon Graphics
Memory: 3.36 GB / 13.49 GB
Shell:
version: 5.1.16
path: /bin/bash
Binaries:
Node:
version: 20.11.1
path: ~/.nvm/versions/node/v20.11.1/bin/node
Yarn:
version: 4.1.1
path: ~/.nvm/versions/node/v20.11.1/bin/yarn
npm:
version: 10.2.4
path: ~/.nvm/versions/node/v20.11.1/bin/npm
Watchman: Not Found
SDKs:
Android SDK: Not Found
IDEs:
Android Studio: Not Found
Languages:
Java:
version: 17.0.11
path: /usr/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.74.3
wanted: 0.74.3
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: false
iOS:
hermesEnabled: Not found
newArchEnabled: false
Having the same issue on Android (working fine on iOS). It seems like the auto-linking process is not working properly for some reason. Running RN 0.74.