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

Most upvoted comments

Same problem, it works if you rollback to the previous version: yarn add react-native-router-flux@3.38.0

@sporteman use this workaround:

    "react": "16.0.0-alpha.6",
    "react-addons-pure-render-mixin": "15.5.2",
    "react-native": "0.43.3",
    "react-native-router-flux": "3.38.0",
    "react-static-container": "^1.0.1",

i have a same problem but i solved following these step:

  • react-native-router-flux is removed from dependencies of package.json in Example project
  • Other libraries that dependencies of package.json in Example project is installed with npm i command.
  • After all that, react-native-router-flux library is installed with npm i react-native-router-flux@3.38.0 --save
  • if project does not still work ,you should 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:

ProjectName > node_modules > react-native-router-flux > node_modules > react-native

works… but this should be fixed…

+1 still have a problem with “react-native”: “0.44.2” “react-native-router-flux”: “3.39.2”

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