Error: Naming collision detected
Tried this with npm 2 and 3 versions. react-native and react-native-router don't work together
Error building DependencyGraph:
Error: Naming collision detected: /Users/native/node_modules/react-native-router/node_modules/react-native/packager/react-packager/src/DependencyResolver/haste/polyfills/String.prototype.es6.js collides with /Users/native/node_modules/react-native/packager/react-packager/src/Resolver/polyfills/String.prototype.es6.js
at HasteMap._updateHasteMap (HasteMap.js:123:13)
at HasteMap.js:94:28
at tryCallOne (/Users/native/node_modules/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/native/node_modules/react-native/node_modules/promise/lib/core.js:123:15
at flush (/Users/native/node_modules/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at doNTCallback0 (node.js:417:9)
at process._tickCallback (node.js:346:13)
same issue here with "react-native": "^0.17.0",
I have found quick :hankey: solution here:
http://stackoverflow.com/questions/33275700/error-naming-collision-detected
@tomaass so i have to rm -rf node_modules/react-native-router/node_modules/react-native? but why? how can this be fixed the right way?
i got this problem so often with multiple other packages.
@maluramichael There is a problem when you have dependency on some package to another version of the same package than you use in your project
it's completely fixed in this PR https://github.com/t4t5/react-native-router/pull/59 but @t4t5 haven't made new version yet. So you have to install react-native-router directly from github like this npm install react-native-router@[email protected]:t4t5/react-native-router.git
@tomaass thank you for clarification. Will be waiting for a new version
@yarax This repo is no longer maintained. Please refer to react-native-simple-router.
@charpeni, what's the difference between https://github.com/react-native-simple-router-community/react-native-simple-router and https://github.com/MikaelCarpenter/gb-native-router? I see comments to the gb router and now there's the simple router.
@gh0sturd MikaelCarpenter/gb-native-router is based on this repo, because this repo is no longer maintained. But Mikael do the same thing..
So, a community was created to maintain and develop a router component based on the most updated version of react-native-router. It's now call react-native-simple-router.
Do this:
$ rm -rf ./node_modules/react-native-router/node_modules/react-native
I really like this project but yeah looks like it's no longer maintained here.
Another option is react-native-router-flux. I ended up using this because I was also getting naming collisions with fbemitter. Also has a slightly cleaner API imo.