7
votes

Our webapp depends on React 15. To maintain parity between the Android/iOS devices, import React from "react"; should yield React 15 even on the devices. However, after installing [email protected] via npm and attempting to start the Android app in dev mode, I'm a receiving this error:

Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: IOSDefaultEventPluginOrder Paths: /node_modules/react/lib/IOSDefaultEventPluginOrder.js collides with /node_modules/react-native/Libraries/ReactIOS/IOSDefaultEventPluginOrder.js

This error is caused by a @providesModule declaration with the same name accross two different files. Error: @providesModule naming collision: Duplicate module name: IOSDefaultEventPluginOrder
Paths: /node_modules/react/lib/IOSDefaultEventPluginOrder.js collides with /node_modules/react-native/Libraries/ReactIOS/IOSDefaultEventPluginOrder.js

This error is caused by a @providesModule declaration with the same name accross two different files. at HasteMap._updateHasteMap (/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:160:15) at /node_modules/node-haste/lib/DependencyGraph/HasteMap.js:125:25

I understand that this is due to React and React Native containing the same js file, but does anyone know if there is a way to properly resolve these dependencies?

Environment: - Mac OSX (latest) - Android (have not tested on iOS) - React Native 0.25.0-rc

1
Solution was posted here I posted the solution at there.fcemmon

1 Answers

4
votes

Never mind - updating to React Native 26.0-rc fixes this issue since React 15.0.2 is now a dependency.