question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invariant Violation: requireNativeComponent: "RNDateTimePicker" was not found in the UIManager

See original GitHub issue

Bug

The component appears to not be working. Once my app reaches the screen where the component is called it crashes.

Invariant Violation: Invariant Violation: Invariant Violation: requireNativeComponent: "RNDateTimePicker" was not found in the UIManager.

This error is located at:
    in RNDateTimePicker (at datetimepicker.ios.js:81)
    in RCTView (at View.js:45)
    in View (at datetimepicker.ios.js:80)
    in Picker (at DatePicker.js:38)
    in RCTView (at View.js:45)
    in View (at DatePicker.js:31)
    in DatePicker (at HomeScreen.js:18)
    in RCTScrollContentView (at ScrollView.js:976)
    in RCTScrollView (at ScrollView.js:1115)
    in ScrollView (at HomeScreen.js:14)
    in RCTView (at View.js:45)
    in View (at HomeScreen.js:13)
    in HomeScreen (at SceneView.js:9)
    in SceneView (at DrawerView.js:149)
    in RCTView (at View.js:45)
    in View (at ResourceSavingScene.js:20)
    in RCTView (at View.js:45)
    in View (at ResourceSavingScene.js:16)
    in ResourceSavingScene (at DrawerView.js:148)
    in RCTView (at View.js:45)
    in View (at screens.native.js:83)
    in ScreenContainer (at DrawerView.js:138)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at DrawerLayout.js:446)
    in RCTView (at View.js:45)
    in View (at createAnimatedComponent.js:151)
    in AnimatedComponent (at DrawerLayout.js:445)
    in PanGestureHandler (at DrawerLayout.js:501)
    in DrawerLayout (at DrawerView.js:165)
    in DrawerView (at createNavigator.js:61)
    in Navigator (at createAppContainer.js:429)
    in NavigationContainer (at SceneView.js:9)
    in SceneView (at createTabNavigator.js:39)
    in RCTView (at View.js:45)
    in View (at ResourceSavingScene.js:37)
    in RCTView (at View.js:45)
    in View (at ResourceSavingScene.js:26)
    in ResourceSavingScene (at createBottomTabNavigator.js:121)
    in RCTView (at View.js:45)
    in View (at screens.native.js:83)
    in ScreenContainer (at createBottomTabNavigator.js:111)
    in RCTView (at View.js:45)
    in View (at createBottomTabNavigator.js:110)
    in TabNavigationView (at createTabNavigator.js:197)
    in NavigationView (at createNavigator.js:61)
    in Navigator (at createAppContainer.js:429)
    in NavigationContainer (at App.js:38)
    in ViewManagerAdapter_ExpoLinearGradient (at NativeViewManagerAdapter.js:49)
    in ForwardRef(Adapter<ExpoLinearGradient>) (at NativeLinearGradient.ios.js:5)
    in NativeLinearGradient (at LinearGradient.js:12)
    in LinearGradient (at App.js:37)
    in Provider (at App.js:36)
    in App (at withExpoRoot.js:20)
    in RootErrorBoundary (at withExpoRoot.js:19)
    in ExpoRootComponent (at renderApplication.js:35)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:98)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:115)
    in AppContainer (at renderApplication.js:34)

This error is located at:
    in NavigationContainer (at SceneView.js:9)
    in SceneView (at createTabNavigator.js:39)
    in RCTView (at View.js:45)
    in View (at ResourceSavingScene.js:37)
    in RCTView (at View.js:45)
    in View (at ResourceSavingScene.js:26)
    in ResourceSavingScene (at createBottomTabNavigator.js:121)
    in RCTView (at View.js:45)
    in View (at screens.native.js:83)
    in ScreenContainer (at createBottomTabNavigator.js:111)
    in RCTView (at View.js:45)
    in View (at createBottomTabNavigator.js:110)
    in TabNavigationView (at createTabNavigator.js:197)
    in NavigationView (at createNavigator.js:61)
    in Navigator (at createAppContainer.js:429)
    in NavigationContainer (at App.js:38)
    in ViewManagerAdapter_ExpoLinearGradient (at NativeViewManagerAdapter.js:49)
    in ForwardRef(Adapter<ExpoLinearGradient>) (at NativeLinearGradient.ios.js:5)
    in NativeLinearGradient (at LinearGradient.js:12)
    in LinearGradient (at App.js:37)
    in Provider (at App.js:36)
    in App (at withExpoRoot.js:20)
    in RootErrorBoundary (at withExpoRoot.js:19)
    in ExpoRootComponent (at renderApplication.js:35)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:98)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:115)
    in AppContainer (at renderApplication.js:34)

This error is located at:
    in NavigationContainer (at App.js:38)
    in ViewManagerAdapter_ExpoLinearGradient (at NativeViewManagerAdapter.js:49)
    in ForwardRef(Adapter<ExpoLinearGradient>) (at NativeLinearGradient.ios.js:5)
    in NativeLinearGradient (at LinearGradient.js:12)
    in LinearGradient (at App.js:37)
    in Provider (at App.js:36)
    in App (at withExpoRoot.js:20)
    in RootErrorBoundary (at withExpoRoot.js:19)
    in ExpoRootComponent (at renderApplication.js:35)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:98)
    in RCTView (at View.js:45)
    in View (at AppContainer.js:115)
    in AppContainer (at renderApplication.js:34)
- node_modules/react-native/Libraries/ReactNative/getNativeComponentAttributes.js:29:4 in getNativeComponentAttributes
- node_modules/react-native/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js:104:25 in get
- ... 18 more stack frames from framework internals


Library version: 1.0.0

Steps To Reproduce

  1. npm install --save @react-native-community/datetimepicker
  2. expo start

Describe what you expected to happen:

  1. For a button to appear where I could press and open the date picker

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:13
  • Comments:28 (1 by maintainers)

github_iconTop GitHub Comments

8reactions
joelrorsethcommented, Nov 24, 2019

Using react-native link and installing pods fixed this issue for me, on RN 0.60.3. Not sure why this section was removed from readme.

react-native link @react-native-community/datetimepicker && cd ios && pod install

4reactions
evrimfeyyazcommented, Sep 11, 2019

@mrcl3an Did you try doing pod install and restarting the Metro Bundler?

Read more comments on GitHub >

github_iconTop Results From Across the Web

React Native - Invariant Violation "RNDateTimePicker"
Invariant Violation: Invariant Violation: requireNativeComponent: "RNDateTimePicker" was not found in the UIManager. Anyone else experiences ...
Read more >
React Native – Invariant Violation “RNDateTimePicker”
Invariant Violation: Invariant Violation: requireNativeComponent: "RNDateTimePicker" was not found in the UIManager. Anyone else experiences this error?
Read more >
[Solved]-React Native - Invariant Violation "RNDateTimePicker"
You cannot use react-native-dateTimepicker because it requires manual linking of native code. So its not possible with expo. You can use the expo...
Read more >
react-native-community/datetimepicker - npm
Defines the maximum date that can be selected. Note that on Android, this only works for date mode because TimePicker does not support...
Read more >
ERROR Invariant Violation: requireNativeComponent ...
Invariant Violation : requireNativeComponent: "RNCWebView" was not found in the UIManager. shell by Grieving Gharial on Jul 31 2021 Comment.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found