Invariant Violation: Tried to register two views with the same name RNDateTimePicker
package.json
"react-native": "0.63.2",
"@react-native-community/datetimepicker": "^2.6.2",
"react-native-modal-datetime-picker": "^9.1.0"
react-native run-ios command would launch the iOS simulator but the app won't launch, instead it would throw the following error log:
ERROR Invariant Violation: Tried to register two views with the same name RNDateTimePicker ERROR Invariant Violation: Module AppRegistry is not a registered callable module (calling runApplication)
According to my Gemfiles RNDateTimePicker points to node_modules/@react-native-community/datetimepicker, but not sure what's the issue here neither how to fix it.
Issue was not matching datetimepicker versions over different files: package.json, package.json.lock, Podfile.lock.
Uninstalled with npm uninstall @react-native-community/datetimepicker. Then manually deleted it from the package-json.lock and Podfile.lock.
Then installed again npm run @react-native-community/datetimepicker and then pod install in the iOS folder.
Got them all to version 3.4.3