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

Unable to autolink optionalDependencies #874

Closed
auzwang opened this issue Dec 2, 2019 · 1 comment
Closed

Unable to autolink optionalDependencies #874

auzwang opened this issue Dec 2, 2019 · 1 comment
Labels
question Further information is requested

Comments

@auzwang
Copy link

auzwang commented Dec 2, 2019

I have an optional dependency defined in package.json:

  "optionalDependencies": {
    "optional-react-native-module": "1.0.0"
  }

Despite it being installed into /node_modules, react-native config does not output this dependency configuration.

When defining the optional dependency in package.json's dependencies block, it does get autolinked.

Is there a way to autolink optional dependencies?

A potential workaround is to specify the optional dependency in dependencies as well.

@auzwang auzwang added the question Further information is requested label Dec 2, 2019
@thymikee
Copy link
Member

thymikee commented Dec 2, 2019

You need to add this lib as your project dependency as well, no other way at the moment. Here's an issue tracking how we can make it better: #870

@thymikee thymikee closed this as completed Dec 2, 2019
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