react-native-picker-select icon indicating copy to clipboard operation
react-native-picker-select copied to clipboard

@react-native-picker/picker as a peerDependency to solve duplicate/Invariant violation issue

Open Rehubbard opened this issue 4 years ago • 8 comments

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: image

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.

Rehubbard avatar Oct 25 '21 21:10 Rehubbard

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

kivohin avatar Nov 08 '21 21:11 kivohin

@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!

Rehubbard avatar Dec 17 '21 18:12 Rehubbard

@juaal12 @kivohin any updates merging this PR? Thanks

rushatgabhane avatar Mar 02 '22 00:03 rushatgabhane

@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.

LucioChavezFuentes avatar Mar 02 '22 18:03 LucioChavezFuentes

Hey @juaal12 @kivohin! Is there any update on merging this PR? Thank you so much!

luacmartins avatar Mar 15 '22 15:03 luacmartins

Seems like the auto-merge failed because of

Screen Shot 2022-03-22 at 2 58 27 PM

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

aldo-expensify avatar Mar 22 '22 19:03 aldo-expensify

@Rehubbard please see above

rikur avatar Mar 30 '22 20:03 rikur

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.

keithdmoore avatar Jun 24 '22 13:06 keithdmoore

seems like lockfile changes are missing from this, no?

lfkwtz avatar Aug 28 '23 16:08 lfkwtz

@Rehubbard can you also bump to ^2.4.0?

lfkwtz avatar Aug 28 '23 18:08 lfkwtz