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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatically adding child dependency pods in React Native #914

Closed
irohitb opened this issue Jan 15, 2020 · 1 comment
Closed

Automatically adding child dependency pods in React Native #914

irohitb opened this issue Jan 15, 2020 · 1 comment
Labels
question Further information is requested

Comments

@irohitb
Copy link

irohitb commented Jan 15, 2020

Ask your Question

I made a repo sometime back https://github.com/irohitb/react-native-smart-statusbar

Earlier I was using react-native-device-info as a peer Dependency but recently I moved it to the dependencies

Now, When I install this npm repo, the pods associated with the ``react-native-device-info` aren't added to the project and hence it throws following error

    Error: @react-native-community/react-native-device-info: NativeModule.RNDeviceInfo is null. To fix this issue try these steps:
      • For react-native <= 0.59: Run `react-native link react-native-device-info` in the project root.
      • Rebuild and re-run the app.
      • If you are using CocoaPods on iOS, run `pod install` in the `ios` directory and then rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.
      If none of these fix the issue, please open an issue on the Github repository: https://github.com/react-native-community/react-native-device-info

Can someone help me in figuring out a way when a user installs the repo, pods for react-native-device-infoalso get added?

@irohitb irohitb added the question Further information is requested label Jan 15, 2020
@thymikee
Copy link
Member

thymikee commented Jan 15, 2020

Currently CLI's autolinking doesn't support native deps depending on other native deps (whether as peer or direct).

The process we have today is:

  • declare react-native-device-info as a peer dependency
  • instruct users to install react-native-device-info alongside your library

Please see #870 where we discuss on how to make it easier for everybody.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants