Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duplicate React #1114

Closed
kdong007 opened this issue Dec 21, 2017 · 8 comments
Closed

duplicate React #1114

kdong007 opened this issue Dec 21, 2017 · 8 comments

Comments

@kdong007
Copy link

Thanks so much for filing an issue or feature request! Please fill out the following (wherever relevant):

Steps to Reproduce

  1. yarn add react-native-code-push
  2. react-native link
  3. pod install
  4. yarn start

Expected Behavior

node packager runs without warning/errors

Actual Behavior

Loading dependency graph...jest-haste-map: @providesModule naming collision:
  Duplicate module name: verifyPropTypes
  Paths: /Users/kdong/react-native-app/ios/Pods/React/Libraries/ReactIOS/verifyPropTypes.js collides with /Users/kdong/react-native-app/node_modules/react-native/Libraries/ReactNative/verifyPropTypes.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: PerformanceOverlay
  Paths: /Users/kdong/react-native-app/ios/Pods/React/Libraries/Inspector/PerformanceOverlay.js collides with /Users/kdong/react-native-app/node_modules/react-native/Libraries/Inspector/PerformanceOverlay.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: TransformPropTypes
  Paths: /Users/kdong/react-native-app/ios/Pods/React/Libraries/StyleSheet/TransformPropTypes.js collides with /Users/kdong/react-native-app/node_modules/react-native/Libraries/StyleSheet/TransformPropTypes.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: flattenStyle
  Paths: /Users/kdong/react-native-app/ios/Pods/React/Libraries/StyleSheet/flattenStyle.js collides with /Users/kdong/react-native-app/node_modules/react-native/Libraries/StyleSheet/flattenStyle.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: NetInfo
  Paths: /Users/kdong/react-native-app/ios/Pods/React/Libraries/Network/NetInfo.js collides with /Users/kdong/react-native-app/node_modules/react-native/Libraries/Network/NetInfo.js

This warning is caused by a @providesModule declaration with the same name across two different files.
jest-haste-map: @providesModule naming collision:
  Duplicate module name: bezier
  Paths: /Users/kdong/react-native-app/ios/Pods/React/Libraries/Animation/bezier.js collides with /Users/kdong/react-native-app/node_modules/react-native/Libraries/Animated/src/bezier.js

Environment

  • react-native-code-push version: 5.2.1
  • react version: 16.2.0
  • react-native version: 0.51.0
  • iOS/Android/Windows version: 11
  • Does this reproduce on a debug build or release build? debug
  • Does this reproduce on a simulator, or only on a physical device? physical device

(The more info the faster we will be able to address it!)

basically I followed instructions https://docs.microsoft.com/en-us/appcenter/distribution/codepush/react-native, install using react-native link + cocoapods
But after installation, I found that in Pods/ there is another React been installed. This cause duplicate warning as I pasted above. When I use debug build actually connects to packager, it will turn into errors.

The React under Pods/ is expected behavior or should I do something to npm packager that tells it to ignore Pods/React?

@kdong007
Copy link
Author

btw, when I do pod install, it has this log Installing React (0.11.0), but Im using React 16.2?

@michaelmerrill
Copy link

I'm having this issue as well. I have the same environment as @kdong007 above.

@michaelmerrill
Copy link

Since we are using React 16.2, I wonder if this has anything to do with react removing Haste. https://reactjs.org/blog/2017/12/15/improving-the-repository-infrastructure.html#removing-the-custom-module-system

@sergey-akhalkov
Copy link
Contributor

sergey-akhalkov commented Dec 25, 2017

Hi @kdong007, @michaelmerrill, thanks for reaching us.

Please take a look at this #893 (comment) If I get your issue right - it might help you to resolve the configuration problem (CodePush + RN + CocoaPods).

Please let me know if you have any questions.

@kdong007
Copy link
Author

@sergey-akhalkov that fix works. Thanks.

@sergey-akhalkov
Copy link
Contributor

@kdong007, thanks for letting me know, I'm closing this, please feel free to reopen or create a new one in case of any questions/issues.

@tvhieuit
Copy link

screen shot 2018-02-26 at 00 44 51

this issue still appear.
But I added
pod 'CodePush', :path => '../node_modules/react-native-code-push'
pod 'React', :path => '../node_modules/react-native'

So my issue resolved

@futurechallenger
Copy link

futurechallenger commented Mar 18, 2018

I solved this by removing all pod stuff and reinstall it. Here's my podfile:
NOTE:

  1. Maybe you dont need the boost-for-react-native pod.
  2. GLog pod's name maybe capitalised maybe not, that's depends on react native doc here.
target 'MyApp' do
  
  # Your 'node_modules' directory is probably in the root of your project,
  # but if not, adjust the `:path` accordingly
  pod 'React', :path => '../node_modules/react-native', :subspecs => [
  'Core',
  'CxxBridge', # Include this for RN >= 0.47
  'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
  'RCTText',
  'RCTNetwork',
  'RCTWebSocket', # needed for debugging
  # Add any other subspecs you want to use in your project
  ]
  # Explicitly include Yoga if you are using RN >= 0.42.0
  pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
  
  # Third party deps podspec link
  pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
  pod 'boost-for-react-native', :podspec => '../node_modules/react-native/third-party-podspecs/boost-for-react-native.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'

# Code Push
  pod 'CodePush', :path => '../node_modules/react-native-code-push', :subspecs => ['Core', 'JWT', 'Base64', 'SSZipArchive']

end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants