question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't install into an existing project, double installs React

See original GitHub issue

Summary

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:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found