Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move React and React Native in package.json from dependencies to peerDependencies #7

Closed
ericnograles opened this issue Jun 18, 2017 · 3 comments

Comments

@ericnograles
Copy link
Contributor

Hi there!

We happen to use this library in one of our projects (nice job btw 馃憤 ), but I did notice something that doesn't jive with the latest versions of React Native.

I see your package.json locks down react and react-native to specific versions of both. Unfortunately, when trying to run this with the latest version of RN, it will cause issues. You'll get a weird RSOD that seems to indicate that ActivityIndicator can't be resolved, assuming you import it in from react-native.

The reason for this is because this library pulls in RN 0.40 on top of my actual version of React Native. This causes some collisions and the dependencies get jacked up. Please see this RN issue for reference: facebook/react-native#14302

In that issue, the react-native-calendar-picker was causing grief for that particular developer because it locked down the version of RN.

I'd suggest adding a little flexibility to your package.json. Stealing from AirBnB's react-native-maps library, you might want to refactor your package.json by moving your react-native and react from dependencies to peerDependencies like so:

"peerDependencies": {
    "react": ">=15.4.0",
    "react-native": ">=0.40"
  }

I'll submit a PR shortly for this, but thought I'd let you know.

Thank you!

@mileung
Copy link
Owner

mileung commented Jun 18, 2017

Thanks! Merged your pull request just now!

@kylanhurt
Copy link

@mileung It looks like this change was not merged into whatever version npm install done-button installs. Or am I doing something wrong?

@mileung
Copy link
Owner

mileung commented Aug 12, 2017

@kylanhurt Probably my fault, but no one has mentioned this issue until now. Anyways, I just published version 1.0.4, so it should definitely work now.

@mileung mileung closed this as completed Aug 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants