Solvedreact 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
33 Answers

✔️Accepted Answer

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

Other Answers:

@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...

Related Issues:

141
react native router flux Duplicate versions of react-native being installed
Got wrecked by this too Fixed with the rollback to 3.38.0 react-native-router-flux v3.38.1 react-nat...
49
react native router flux @providesModule naming collision error after installing react-native-router-flux
Same problem it works if you rollback to the previous version: yarn add react-native-router-flux@3.3...
32
react native router flux Help With Drawer Menu
Hi I implemented the Drawer from router-flux v4.0.0-beta.14 like this: (I couldnt find any info on h...
31
react native router flux Bundling error
Running packager like that resolves problem for me react-native start --reset-cache --verbose Verbos...
28
react native router flux Animations for transition on Android
To anyone who stumbles on to this thread - to get the old direction= behaviour back you can just add...
26
react native router flux Ability to provide the left/right navbar buttons from the rendered component
@jrwm thanks it works The current set up of the buttons is not ideal They have to be declared and ho...
25
react native router flux Back navigation won't work on Android
I solved this way: <Router backAndroidHandler={this.onBackPress}> and: I've noticed that on Android:...
23
react native router flux Fatal Exception: com.facebook.react.common.JavascriptException: TypeError: undefined is not an object (evaluating 'r.default')
run this package.json snippet in postinstall or manually before release: For older react-navigation ...
22
react native router flux Double-tapping fires Actions twice
This is a workaround I use for the moment: For every button that triggers a navigation action ...
16
react native router flux Problem about pop and refresh
Hello guys I have the same problem with tab scene too : componentWillReceiveProps is not triggered u...
16
react native router flux onEnter/onExit hooks inside scenes components
@aksonov Can you provide a sample code using onEnter inside a component? Thanks ...
14
react native router flux Forbid swiping back
@mvaivre to disable swiping back passing panHandlers={null} worked for me e.g: <Scene key=modal comp...
13
react native router flux ERROR: UNMET PEER DEPENDENCY react@15.5.4
I fixed this by removing the little ^ symbol in my package.json file in front of the version number ...
5
react native router flux Actions.[SCENE_NAME] is not working.
with react-native-router-flux: ^3.30.2 if i set type to my scenes Actions dont work And in Drawer if...