react-native-router icon indicating copy to clipboard operation
react-native-router copied to clipboard

Error: Naming collision detected

Open yarax opened this issue 10 years ago • 10 comments

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)

yarax avatar Jan 11 '16 14:01 yarax

same issue here with "react-native": "^0.17.0",

tomaass avatar Jan 12 '16 14:01 tomaass

I have found quick :hankey: solution here:

http://stackoverflow.com/questions/33275700/error-naming-collision-detected

tomaass avatar Jan 12 '16 14:01 tomaass

@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 avatar Jan 13 '16 22:01 maluramichael

@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 avatar Jan 14 '16 09:01 tomaass

@tomaass thank you for clarification. Will be waiting for a new version

yarax avatar Jan 14 '16 09:01 yarax

@yarax This repo is no longer maintained. Please refer to react-native-simple-router.

charpeni avatar Jan 25 '16 16:01 charpeni

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

chenbrian avatar Jan 25 '16 22:01 chenbrian

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

charpeni avatar Jan 26 '16 14:01 charpeni

Do this:

$ rm -rf ./node_modules/react-native-router/node_modules/react-native

WaKeMaTTa avatar Jan 28 '16 10:01 WaKeMaTTa

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.

timkendall avatar Jan 31 '16 22:01 timkendall