React-native-code-push: duplicate React

Created on 21 Dec 2017  路  8Comments  路  Source: microsoft/react-native-code-push

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?

iOS waiting-for-clarification

Most helpful comment

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

All 8 comments

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

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

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

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

Please take a look at this https://github.com/Microsoft/react-native-code-push/issues/893#issuecomment-317648454 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.

@sergey-akhalkov that fix works. Thanks.

@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.

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

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
Was this page helpful?
0 / 5 - 0 ratings

Related issues

djw27 picture djw27  路  3Comments

Adr1ann picture Adr1ann  路  3Comments

quanzaiyu picture quanzaiyu  路  3Comments

ACCTFORGH picture ACCTFORGH  路  3Comments

cgerikj picture cgerikj  路  3Comments