-
Notifications
You must be signed in to change notification settings - Fork 902
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
autolink doesn't work for libraries which depend on other components with native module #1347
Comments
there are some cases where autolinking of transitive dependencies could be very useful, but it is not supported at the moment in react-native-cli's autolinking and, even if it were, i would not recommend using it for these specific cases.
|
I understand that. But I also what to know what the best way to solve this problem is. If my library is built upon many dependencies that have native modules, I don't want my users to install these dependencies themselves, that is very inconvenient I think. |
@chj-damon - i agree it's not always ideal! if you have some proposal for how to do it better, then i'd love to hear it! for now, explaining to users that they need to install these other packages is the best you can do. for example: https://reactnavigation.org/docs/getting-started#installing-dependencies-into-a-bare-react-native-project |
I made an example project under my library project, which I want to use the native module: How can I make it work? I tried to config module.exports = {
assets: ['./assets/fonts'],
dependencies: {
'myLib': {
root: '../android',
},
},
}; it doesn't work. |
is there any manual about how to build a library that contains native modules, and an example project to test it? |
I am having the same issue. We should be able to configure those in the library. I cannot think of a reason why you have not solved this yet. |
There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days. |
I feel like this is relevant for mono repos as well (I'm using yarn berry) |
Ask your Question
I build a react-native-library that relies on many other dependencies, like
react-native-svg
、react-native-image-picker
etc. all these dependencies have native modules.library
|- react-native-svg
|- react-native-image-picker
|- rn-fetch-blob
|- react-native-reanimated
Now In one project I install my library and run
pod install
underios
folder, it seems that autolink won't link these native modules from my library dependencies.what should I do to make it work? I don't want to put all these dependencies in
peerDependencies
to ask the user to install them manually.The text was updated successfully, but these errors were encountered: