React-Native autolink a dependency of a dependency

389 Views Asked by At

React-native Autolinking process is not picking up dependencies of the dependencies. Before RN60 - I had to manually force the link running the command react-native link 'nomeOfTheProject' name but this is not working anymore. This is what I got when I run this command after the RN60 upgrade.

$react-native link react-native-autobridge
 Unknown dependency. Make sure that the package you are trying to link is already installed in your "node_modules" and present in your "package.json" dependencies. 


The dependency is under node_modules but it's not included in the main package.json indeed.
The react-native-autobridge is included by one of the main dependencies.

node_modules
    my_dependency
        package.json // -> include react-native-autobridge
    react-native-autobridge // -> react-native-autobridge gets downloaded under node_modules.


If the add react-native-autobridge straight to my main package.json, all works fine. But that's not what I want.

Does anyone know how to link a dependency of a dependency?

0

There are 0 best solutions below