Can't install into an existing project, double installs React
See original GitHub issueSummary
Installed into an existing “ejected” project that had react-native at the node_modules level via yarn install
When I ran pod install, it added RNDeviceInfo, but also React.
When I then
| Version | 0.24 | | Affected OS | iOS | | OS Version | 12.0 |
Current behavior
yarn add react-native-device-info
yarn install
react-native link react-native-device-info
cd ios && pod install & cd ..
It installs RNDeviceInfo, but also React as a dependency?
yarn ios
System 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`
Expected behavior
No ambiguous resolution warning
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Can't install into an existing project, double installs React #515
Summary. Installed into an existing "ejected" project that had react-native at the node_modules level via yarn install.
Read more >create-react-app, installation error ("command not found")
Step # 1:- Make sure, Node js and React js is installed globally. You can check Nodejs by node --version . If not...
Read more >How to Upgrade to React 18
Installing. To install the latest version of React: npm install react react-dom. Or if you're using yarn: yarn add react react-dom ...
Read more >React JS Setup, Installation and First React Project Creation
In this video we will discuss1. React Installation and Setup2. NodeJs and NPM Installation3. Create- React -App tool Installation4.
Read more >Setting up the development environment - React Native
Install the Expo client app on your iOS or Android phone and connect to the ... If you're integrating React Native into an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Fixed my problem thus, might be worth adding a variant of this information to the README? https://stackoverflow.com/questions/52737251/how-do-i-prevent-react-native-device-info-causing-react-ambiguity-on-my-setup/52776146#52776146
@sanchapereira Yep. You may need more dependencies than I did. https://stackoverflow.com/questions/52737251/how-do-i-prevent-react-native-device-info-causing-react-ambiguity-on-my-setup/52776146#52776146