react-native-webbrowser
react-native-webbrowser copied to clipboard
Fail to build in react-native run-ios
This is on latest RN 0.22.
[4:05:56 PM] <START> Building Dependency Graph
[4:05:56 PM] <START> Crawling File System
[Hot Module Replacement] Server listening on /hot
React packager ready.
[4:05:57 PM] <END> Crawling File System (1062ms)
[4:05:57 PM] <START> Building in-memory fs for JavaScript
[4:05:57 PM] <END> Building in-memory fs for JavaScript (172ms)
[4:05:57 PM] <START> Building in-memory fs for Assets
[4:05:57 PM] <END> Building in-memory fs for Assets (127ms)
[4:05:57 PM] <START> Building Haste Map
[4:05:57 PM] <START> Building (deprecated) Asset Map
[4:05:57 PM] <END> Building (deprecated) Asset Map (35ms)
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: TouchHistoryMath
Paths: ~/Documents/code/<app>/node_modules/react-native-webbrowser/node_modules/react-native/Libraries/vendor/react/browser/eventPlugins/TouchHistoryMath.js collides with ~/Documents/code/<app>/node_modules/react-native/Libraries/vendor/react/browser/eventPlugins/TouchHistoryMath.js
This error is caused by a @providesModule declaration with the same name accross two different files.
Error: @providesModule naming collision:
Duplicate module name: TouchHistoryMath
Paths: ~/Documents/code/<app>/node_modules/react-native-webbrowser/node_modules/react-native/Libraries/vendor/react/browser/eventPlugins/TouchHistoryMath.js collides with ~/Documents/code/<app>/node_modules/react-native/Libraries/vendor/react/browser/eventPlugins/TouchHistoryMath.js
This error is caused by a @providesModule declaration with the same name accross two different files.
at HasteMap._updateHasteMap (~/Documents/code/<app>/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:160:15)
at ~/Documents/code/<app>/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:125:25
at run (~/Documents/code/<app>/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:89:22)
at ~/Documents/code/<app>/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:102:28
at flush (~/Documents/code/<app>/node_modules/babel-polyfill/node_modules/core-js/modules/_microtask.js:14:5)
at _combinedTickCallback (node.js:376:9)
at process._tickCallback (node.js:407:11)
~
Process terminated. Press <enter> to close the window
I am having the same issue after an upgrade.
Having the same issue after installing it. I'm working on Ubuntu 14.04 LTS, npm v3.7.3 and NodeJS v4.2.6:
[1:56:41 PM] <END> Building (deprecated) Asset Map (315ms)
Failed to build DependencyGraph: Naming collision detected: /home/dev/Sandbox/react/AndroidClient/node_modules/react-native/Libraries/vendor/react/platformImplementations/universal/worker/UniversalWorkerNodeHandle.js collides with /home/dev/Sandbox/react/AndroidClient/node_modules/react-native-webbrowser/node_modules/react-native/Libraries/vendor/react/platformImplementations/universal/worker/UniversalWorkerNodeHandle.js
Error: Naming collision detected: /home/dev/Sandbox/react/AndroidClient/node_modules/react-native/Libraries/vendor/react/platformImplementations/universal/worker/UniversalWorkerNodeHandle.js collides with /home/dev/Sandbox/react/AndroidClient/node_modules/react-native-webbrowser/node_modules/react-native/Libraries/vendor/react/platformImplementations/universal/worker/UniversalWorkerNodeHandle.js
at HasteMap._updateHasteMap (HasteMap.js:132:13)
at HasteMap.js:103:28
at tryCallOne (/home/dev/Sandbox/react/AndroidClient/node_modules/promise/lib/core.js:37:12)
at /home/dev/Sandbox/react/AndroidClient/node_modules/promise/lib/core.js:123:15
at flush (/home/dev/Sandbox/react/AndroidClient/node_modules/asap/raw.js:50:29)
at nextTickCallbackWith0Args (node.js:419:9)
at process._tickCallback (node.js:348:13)
It has a redundant dependency to react-native:
https://github.com/d-a-n/react-native-webbrowser/blob/master/package.json#L33
I just removed that dependency, deleted the react-native folder from react-native-webbrowser/node_modules and run again:
react-native start
and it worked.
Chiming in because this issue is one of the top search results for other similar issues.
This error means one of your packages has a redundant or incompatible dependency, check the referenced paths. Most of the time you can fix the issue simply by updating the package.json for the offending package.
If everything works fine, don't forget to make a pull request for the said package.
Shame this isn't maintained