Importing createDrawerNavigator throws 'NativeReanimated' error.
See original GitHub issueDescription
After following the installation instructions for React Navigation and then Drawer Navigation, I am getting a NativeReanimated error.
I have reanimated in both my package-lock.json:
"react-native-reanimated": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-2.0.0.tgz",
"integrity": "sha512-kIrdBoXSky7DQ62SOgosgimKM+Lt+SzAaM+ovVpCLBcwUK2aYRfLxa9ffgvKjeH9/n7dONlwEMjbKssGkuyq2Q==",
"requires": {
"@babel/plugin-transform-object-assign": "^7.10.4",
"fbjs": "^3.0.0",
"mockdate": "^3.0.2",
"string-hash-64": "^1.0.3"
}
and in my package.json:
"dependencies": {
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/drawer": "^5.12.4",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.0.0",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.18.1"
}
It was installed vis the React Navigation instructions as follows:
npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view
This is the error I’m receiving in Metro and node after running npx react-native run-android: [Sat Mar 06 2021 10:25:12.380] BUNDLE ./index.js
[Sat Mar 06 2021 10:25:15.192] ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(…): ‘NativeReanimated’ could not be found. Verify that a module by this name is registered in the native binary. [Sat Mar 06 2021 10:25:15.196] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication) [Sat Mar 06 2021 10:25:15.196] ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
In the emulator I’m just receiving a blank white screen.
Screenshots
Steps To Reproduce
- Try to run the app via: npx react-native run-android
Expected behavior
The app should run.
Actual behavior
I get a blank white screen.
Snack or minimal code example
Commenting out this line: import { createDrawerNavigator } from ‘@react-navigation/drawer’; fixes the error.
Package versions
Windows 10 Visual Studio Code
"@react-native-community/masked-view": "^0.1.10",
"@react-navigation/drawer": "^5.12.4",
"@react-navigation/native": "^5.9.3",
"@react-navigation/stack": "^5.14.3",
"react": "16.13.1",
"react-native": "0.63.4",
"react-native-gesture-handler": "^1.10.3",
"react-native-reanimated": "^2.0.0",
"react-native-safe-area-context": "^3.1.9",
"react-native-screens": "^2.18.1"
- NodeJS: v10.19.0
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:21
run
npx react-native start --reset-cache
after thatnpx react-native run-android
ornpx react-native run-ios
thank yo bro… I almost went crazy.