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.

[update error]Duplicate module name: TouchHistoryMath

See original GitHub issue

I update react-native to 0.24.1 and install the peer dependency react @latest(15.0.2) then run react-native upgrade and react-native run-android. and get the error as following:

Failed to build DependencyGraph: @providesModule naming collision: Duplicate module name: TouchHistoryMath Paths: /Users/Mervyn/CodingNet/playwithreactnative/node_modules/react/lib/TouchHistoryMath.js collides with /Users/Mervyn/CodingNet/playwithreactnative/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: /Users/Mervyn/CodingNet/playwithreactnative/node_modules/react/lib/TouchHistoryMath.js collides with /Users/Mervyn/CodingNet/playwithreactnative/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 (/Users/Mervyn/CodingNet/playwithreactnative/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:160:15) at /Users/Mervyn/CodingNet/playwithreactnative/node_modules/node-haste/lib/DependencyGraph/HasteMap.js:125:25 at run (/Users/Mervyn/CodingNet/playwithreactnative/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:89:22) at /Users/Mervyn/CodingNet/playwithreactnative/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:102:28 at flush (/Users/Mervyn/CodingNet/playwithreactnative/node_modules/babel-polyfill/node_modules/core-js/modules/_microtask.js:18:9) at _combinedTickCallback (node.js:370:9) at process._tickCallback (node.js:401:11) ~ Process terminated. Press <enter> to close the window

and I solve it by downgrading react version as the tips of react-native’s npm warn to 0.14.5.

I want to know the reason. Anybody meets the same situation?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:15
  • Comments:16 (3 by maintainers)

github_iconTop GitHub Comments

12reactions
tianwawawacommented, Feb 11, 2017

npm start – --reset-cache

5reactions
sghiassycommented, Oct 24, 2016

I was getting errors like

Failed to build DependencyGraph: @providesModule naming collision:
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: accepts
Duplicate module name: accepts

I solved it by deleting npm’s cache .npm and rerunning packager with --reset-cache

rm -rf ~/.npm
Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix flow error "TouchHistoryMath. Duplicate module ...
I believe it is a bug caused by two modules having the same name. A workaround that solved the issue for me was...
Read more >
Copy module - Enterprise & Sell Answers & Best Practices
I customized my ''Leads'' module and I would like to copy/paste the content ... the files and change the module name to your...
Read more >
react-native-router-flux/CHANGELOG.md - UNPKG
74, - Error while updating property transfrom of a view managed bt RCTView ... 1853, - Duplicate module name: TouchHistoryMath ...
Read more >
React Native Troubleshooting - Jesús Darío - Medium
A non-extensive list of common errors and quickfixes for beginners and not so ... @providesModule naming collision: Duplicate module name: <npm module name>....
Read more >
react-native | Yarn - Package Manager
React Native brings React's declarative UI framework to iOS and Android. With React Native, you use native UI controls and have full access...
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