react-native-razorpay: Duplicate module name: react-native
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
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 27 (11 by maintainers)
I just deleted the node module folder from react-native-razorpay, it worked for me, maybe will work for you too.
it’s work for me https://github.com/aws/awsmobile-cli/issues/172#issuecomment-444445744
@ashutoshshubam you will easily get references regarding blacklisting , anyway I’ve just found one now https://stackoverflow.com/questions/41813211/how-to-make-react-native-packager-ignore-certain-directories
The example folder of this repo contains a file called rn-cli.config.js in which I have blacklisted a particular directory.You can see that for reference.
closing due to inactivity.