I have created a custom npm module
(will use xxx instead of its name) and link it manually using npm install
.
I tried very har
The error you get indicates that you have two react-native
dependencies. One in your main project, one in your xxx module, thus creating a conflict between their package.json
s. seems like if you install a package from a local path, it copies its node_modules
directory.
As you already have react-native
as peer dependency in your custom module's package.json
, try removing E:\cdg-native\CDG\node_modules\react-native-XXX\node_modules
, this should solve the conflict.