react-native-picker-select
react-native-picker-select copied to clipboard
@react-native-picker/picker as a peerDependency to solve duplicate/Invariant violation issue
Problem
On a fresh install and following the readme steps, you end up with 2 versions of @react-native-picker/picker installed. The one that you install yourself (the readme says to) and the version that's listed in the package.json dependencies.
This causes the library to crash with this error:

sidenote: For me, I had already installed @react-native-picker/picker v2 and was using it before this package. And it was breaking due to this package installing v1 as well. I believe this is a good usecase for peerDependencies.
Solution
Move @react-native-picker/picker to peerDependencies in package.json. Keep separate install step in readme.
When can we expect this PR to be merged in? 🙂
Nice work @Rehubbard!
This should solve both these 2 open issues:
- https://github.com/lawnstarter/react-native-picker-select/issues/458
- https://github.com/lawnstarter/react-native-picker-select/issues/403
@lfkwtz any updates on merging this PR? Is there anything else I can do to help it move along in the process?
Just ran into this issue again when upgrading our entire project and all dependencies. Thanks in advance!
@juaal12 @kivohin any updates merging this PR? Thanks
@react-native-picker/picker released a new version that fixes a problem on ref prop in Web version but I can not use the updated version using react-native-picker-select. I tested this pull request on my project and fixes my problem. I see the changes have been approved but not merged. Is there any problem on merging? Is there something I could do? @juaal12 @kivohin Thank you for your time.
Hey @juaal12 @kivohin! Is there any update on merging this PR? Thank you so much!
Seems like the auto-merge failed because of
Could the codeclimate stuff be re-triggered by doing something like what was done here (rebase + force push)?
https://github.com/bbc/simorgh/issues/143#issuecomment-399031278 https://github.com/bbc/simorgh/pull/130#issuecomment-399046698
@Rehubbard please see above
Any updates? I realize the owners @LawnStarterTeam may not have time to properly maintain this library. However, maybe give others the access needed so that it can be maintained. Let the community help! It beats having hundreds of forks where others are likely making the some of the same changes and possibly adding new features that will never be incorporated because the PRs aren't getting merged.
seems like lockfile changes are missing from this, no?
@Rehubbard can you also bump to ^2.4.0?