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
Same problem, it works if you rollback to the previous version:
yarn add [email protected]
If you start a new RN project, you must better use React Navigation
RN .43 uses React 16.0 Alpha while react-native-router-flux uses react 15.5.
Any workaround ?
@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",
Perfect! It works like a charm! Thanks a lot @diegorodriguesvieira
reverting to "react-native-router-flux": "3.38.0", works for me. thanks @diegorodriguesvieira
@diegorodriguesvieira works great thanks!!
How did you find this solution?
Same problem here and needed to use version 3.38.0 to get it to work.
i have a same problem but i solved following these step:
npm i
command.npm i [email protected] --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.
@dcolin pretty new with react-native etc, we are building a production app, atm using react-native-router-flux with redux.
Is navigator mature enough to use and can you do the same things you can do with redux?
The beta 7 RN will give you the same problem. You need to use beta 8 if you are using the latest version of React.
@yasemincidem Thanks - your suggestion worked
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!
re-installed node modules to fix other issue, then hit this, now back to the other problem, with Pods and React-native..
:/
I don't think it's recommended using the current version of react-native-router-flux with RN .43 until a more stable version of react-native-router-flux is out
+1
If you were using @provides NameOfModule, you should now switch to @providesModule
https://github.com/facebook/react-native/releases/tag/v0.44.0
@iegik i used 0.44.0
.
still has bug on [email protected]
i just downgraded to [email protected]
and it works like a charm.
btw, i had the similar problem with camera component and on every version it has shown me this, out of nowhere i just added a global platform on podfile: platform :ios, '9.0'
if fixed all of my problems, except [email protected]
i'm going to test other ios versions to see maybe it would be compatible for 3.38.1
Any idea when the next version of react-native-router-flux is gonna be out? @andkhong
this is still a problem with react-native-router-flux v0.39.1 and react-native v0.43.3
@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
+1
still have a problem with
"react-native": "0.44.2"
"react-native-router-flux": "3.39.2"
+1
remove all node_modules and run again.
remove all node_modules and run again dont work for me but
rm -r node_modules/react-native-video/node_modules/react-native-windows/ worked
@diegorodriguesvieira
sorry, nooby here... how do you implement your work around?
Back in the day, i created a startup script with bash to remove a duplicate declaration of react_native within the package. I've since upgraded to the latest version (highly recommend), although it took 2 weeks to resolve conflicts it was highly worth it.
Startup script was something like... (dobule check the path of the node_modules within router-flux)
yarn install && rm -rf ./node_modules/react-native-router-flux/node_modules/react-native
what if I don't have a node_modules folder in react-native-router-flux?
Look for duplicate packages inside your node_modules/ and nested node_modules inside packages there.
I had problems with it - when developing modules locally - having to remove packages like react
, react-native
and react-navigation
.
Most helpful comment
Same problem, it works if you rollback to the previous version:
yarn add [email protected]