react-native-community / react-native-community/cli

autolink doesn't work for libraries which depend on other components with native module

Open
#1,347 9 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

no-stale-bot question
Dominant language
TypeScript
Stars
2.9k
Forks
949
PR merge metrics
No merged PRs in 30d

Description

Ask your Question

I build a react-native-library that relies on many other dependencies, like react-native-svgreact-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 under ios 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the React Native CLI autolink path and the iOS pod install flow described here. Reproduce a library whose dependencies include native modules such as react-native-svg and verify whether the consuming app includes those dependencies without requiring manual installation.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native
Domain
build-system, mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.