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.

Duplicate module name: react-native

See original GitHub issue
Loading dependency graph...(node:13752) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
  Duplicate module name: react-native
  Paths: E:\my_project\node_modules\react-native-razorpay\node_modules\react-native\package.json collides with E:\my_project\node_modules\react-native\package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at setModule (E:\my_project\node_modules\metro\node_modules\jest-haste-map\build\index.js:462:17)
    at workerReply (E:\my_project\node_modules\metro\node_modules\jest-haste-map\build\index.js:512:9)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:13752) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:13752) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:13752) UnhandledPromiseRejectionWarning: Error: jest-haste-map: @providesModule naming collision:
  Duplicate module name: react-native
  Paths: E:\my_project\node_modules\react-native-razorpay\node_modules\react-native\package.json collides with E:\my_project\node_modules\react-native\package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at setModule (E:\my_project\node_modules\metro\node_modules\jest-haste-map\build\index.js:462:17)
    at workerReply (E:\my_project\node_modules\metro\node_modules\jest-haste-map\build\index.js:512:9)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
(node:13752) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)

Getting above error after upgrading to latest version (2.0.13) of the package. clean and npm --reset-cache already tried but didn’t work.

Issue is quite similar to: https://github.com/razorpay/react-native-razorpay/issues/93 https://github.com/razorpay/react-native-razorpay/issues/42

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:27 (11 by maintainers)

github_iconTop GitHub Comments

14reactions
amrita019commented, Oct 10, 2018

I just deleted the node module folder from react-native-razorpay, it worked for me, maybe will work for you too.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Duplicate Module Name: react-native - Stack Overflow
I just spent some time searching around for a solution and finally found something that worked! I'm not using Firebase, but the discussion ......
Read more >
Duplicate Module Name: react-native - Edward Beazer Blog
This bug usually pops up while installing native modules for iOS. The error comes up because one of the pods requires the React...
Read more >
Duplicate module name: react-native · Issue #1767 - GitHub
The problem occurs when you "pod install" react-native again. so when nodejs compile the library, nodejs finds that there are two library with ......
Read more >
iOS : Duplicate Module Name: react-native - YouTube
iOS : Duplicate Module Name : react - native [ Gift : Animated Search Engine : https://bit.ly/AnimSearch ] iOS : Duplicate Module Name: ......
Read more >
Duplicate module name: create-react-context. Declaration with ...
[Solved]-Duplicate module name: create-react-context. Declaration with same name across different files-React Native · Related Query · More Query from same tag.
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