I'm running into a problem with installing react-native-device-info
into an existing react-native project (created using create-react-native-app
and then ejecting)
I run:
yarn add react-native-device-info
yarn install
react-native link react-native-device-info
cd ios && pod install & cd ..
pod install installs RNDeviceInfo
, but also React
as a dependency?
I then run yarn ios
as normal.
The MetroBundler fails with:
```
This warning is caused by a @providesModule declaration with the same name across two different files.
Loading dependency graph, done.
error: bundling failed: ambiguous resolution: module /Users/thomasclarke/dev/mobile-notifications-native/index.js
tries to require react-native
, but there are several files providing this module. You can delete or fix them:
/Users/thomasclarke/dev/mobile-notifications-native/ios/Pods/React/package.json
/Users/thomasclarke/dev/mobile-notifications-native/node_modules/react-native/package.json
```
I've raised a bug report, as this is clearly unacceptable behaviour, but is this something I can work around with my setup?