lawnstarter / react-native-picker-select

🔽 A Picker component for React Native which emulates the native <select> interfaces for iOS and Android
https://npmjs.com/package/react-native-picker-select
MIT License
1.75k stars 498 forks source link

Invariant Violation: requireNativeComponent "RNCPicker" was not found in the UIManager #344

Closed Kamalnrf closed 3 years ago

Kamalnrf commented 4 years ago

RNCPicker was not found in the UIManager
This happened when I moved to latest version 8.0.0

To Reproduce
(I din't try this in a new project, but here is what I did) Steps to reproduce the behavior:

  1. Update react-native-picker-select to 8.0.0
  2. rm -rf node_modules && yarn cache clean && yarn install
  3. cd ios && pod install
  4. run the IOS build
  5. Launch the open and click on RNPickerSelect component

Expected behavior
To behave like it was in the previous version

Screenshots

Screenshot 2020-08-06 at 02 07 33

Additional details

Reproduction and/or code sample

<RNPickerSelect
   placeholder={{ label: this.props.placeholderText, value: null }}
   items={this.props.items}
   onValueChange={this.props.onValueChange}
   style={{ ...this.pickerSelectStyles() }}
   value={this.props.selectedValue}
/>
zhlee1997 commented 3 years ago

install both

  1. "@react-native-community/picker": "^1.8.1"
  2. "react-native-picker-select": "^8.0.4"

will do the tricks

nikdo commented 3 years ago
@react-native-picker/picker@1.9.11
react-native-picker-select@8.0.4

This combination worked for me. But only after I restarted Simulator.

I'm missing information about this peer dependency in README. Also, it was not clear whether I should go with now deprecated @react-native-community/picker or the @react-native-picker/picker replacement. I'm still not sure if this is by the book, or just random thing that works.

ymc-thzi commented 3 years ago

Thanks @nikdo for pointing out that @react-native-community/picker is deprecated. I installed the replacement version and it works with this one, too. npm install @react-native-picker/picker --save After that I have to install pods and make a new build in XCode.

FaizyQadri commented 3 years ago

Thanks

On Fri, 27 Aug, 2021, 12:43 PM Thomas Zinnbauer, @.***> wrote:

Thanks @nikdo https://github.com/nikdo for pointing out that @react-native-community/picker is deprecated. I installed the replacement version and it also works with this one, too. npm install @react-native-picker/picker --save After that I have to install pods and make a new build in XCode.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lawnstarter/react-native-picker-select/issues/344#issuecomment-906981326, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASH32HK6BCZP6YHIZKMLPXLT643JBANCNFSM4PV4EWOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

dexiouz commented 2 years ago

I resolved this by installing @react-native-community/picker alongside and running npx pod-install and rebuilding the app.