react-native-router-flux: @providesModule naming collision error after installing react-native-router-flux
Version
- react-native-router-flux v3.38.1
- react-native v0.43.4
Here’s the console log, do you have any suggestions to take action from here?
Loading dependency graph...
React packager ready.
jest-haste-map: @providesModule naming collision:
Duplicate module name: react-native
Paths: /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/package.json collides with /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native-router-flux/node_modules/react-native/package.json
This warning is caused by a @providesModule declaration with the same name across two different files.
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: react-native-vector-icons
Paths: /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native-router-flux/node_modules/react-native/local-cli/core/__fixtures__/files/package.json
This error is caused by a @providesModule declaration with the same name across two different files.
Error: @providesModule naming collision:
Duplicate module name: react-native-vector-icons
Paths: /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native-router-flux/node_modules/react-native/local-cli/core/__fixtures__/files/package.json
This error is caused by a @providesModule declaration with the same name across two different files.
at HasteMap._updateHasteMap (/Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:159:13)
at p.getName.then.name (/Users/fuatsengul/repo/rn/app/mobile4teog/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:134:31)
~
Process terminated. Press <enter> to close the window
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 20
- Comments: 32 (1 by maintainers)
Commits related to this issue
- fix naming collision error after updating react-native-router-flux https://github.com/aksonov/react-native-router-flux/issues/1816 — committed to okmttdhr/Miss-YT by okmttdhr 7 years ago
- update react-native-router-flux versions reported here https://github.com/aksonov/react-native-router-flux/issues/1816#issuecomment-296857358 — committed to okmttdhr/Miss-YT by okmttdhr 7 years ago
- V4 announcement, v3 is obsolete now; closes #1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23,#24,#25,#26,#27,#28,#29,#30,#31,#32,#33,#34,#35,#36,#37,#38,#39,#40,#41,#... — committed to aksonov/react-native-router-flux by aksonov 7 years ago
Same problem, it works if you rollback to the previous version:
yarn add react-native-router-flux@3.38.0
@sporteman use this workaround:
i have a same problem but i solved following these step:
npm i
command.npm i react-native-router-flux@3.38.0 --save
npm cache clean
command in terminal.I can work example project that in react-native-router-flux project following these steps.I hope this will be help to you.
@hafizali05 works… deleting react-native from the following path:
works… but this should be fixed…
+1 still have a problem with “react-native”: “0.44.2” “react-native-router-flux”: “3.39.2”
This helped
http://stackoverflow.com/questions/42163164/react-native-providesmodule-declaration-with-the-same-name-across-two-differen/43875440#43875440
RN .43 uses React 16.0 Alpha while react-native-router-flux uses react 15.5.
If you start a new RN project, you must better use React Navigation
if non of these helped, you can delete the node_modules/react-native-router-flux/node_modules/react-native folder.
But it’s the worst way to solve this problem!
Perfect! It works like a charm! Thanks a lot @diegorodriguesvieira