Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help With Naming Collision #379

Closed
quadsurf opened this issue Jan 7, 2017 · 15 comments
Closed

Help With Naming Collision #379

quadsurf opened this issue Jan 7, 2017 · 15 comments

Comments

@quadsurf
Copy link

quadsurf commented Jan 7, 2017

Can't figure out how to fix this, since most naming collisions you google address a pre RN0.18 version regarding FBJS dependency. Please help!

Others having same issue too: oliviertassinari/react-swipeable-views#207
(but there solution not helpful)

Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: react-native-vector-icons
Paths: .../node_modules/react-native/local-cli/rnpm/core/fixtures/files/package.json collides with .../node_modules/react-native/Libraries/Animated/release/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: .../node_modules/react-native/local-cli/rnpm/core/fixtures/files/package.json collides with .../node_modules/react-native/Libraries/Animated/release/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
at HasteMap._updateHasteMap (.../node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:155:13)
at p.getName.then.name (.../node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:130:31)

@oblador
Copy link
Owner

oblador commented Jan 7, 2017

Looks like you have duplicate installations in your node_modules, likely because some other dependency depend on a different version of react-native-vector-icons.

@oblador
Copy link
Owner

oblador commented Jan 7, 2017

Actually upon inspecting this file: https://github.com/facebook/react-native/blob/master/local-cli/core/__fixtures__/files/package.json it looks like your config is messed up somehow. Did you change babel/packager configs? Does it work on a fresh project/after rm -rf node_modules && npm i?

@quadsurf
Copy link
Author

quadsurf commented Jan 7, 2017

@oblador No, unfortunately it does not resolve after trying this:
rm -rf node_modules && npm cache clean && npm i

@oblador
Copy link
Owner

oblador commented Jan 7, 2017

Looks like you're on an old version of RN? Did you try a fresh project?

@quadsurf
Copy link
Author

quadsurf commented Jan 7, 2017

Ya it breaks everything, mainly because a lot of 3rd-party libraries that I'm using do not yet provide compatibility with latest versions of RN

@oblador
Copy link
Owner

oblador commented Jan 7, 2017

K, try manually downgrading to 0.39 then and using RNVI 3.0.

@oblador
Copy link
Owner

oblador commented Jan 7, 2017

Also, your title feels unfair as it's very likely not this library itself being the cause ;-)

@quadsurf
Copy link
Author

quadsurf commented Jan 7, 2017

npm ERR! notarget No compatible version found: react-native-vector-icons@^0.3.9

@quadsurf quadsurf changed the title This Library is Causing a Naming Collision Help With Naming Collision Jan 7, 2017
@oblador
Copy link
Owner

oblador commented Jan 7, 2017

I mean 0.39 of react-native and 3.0.0 of react-native-vector-icons.

@quadsurf
Copy link
Author

quadsurf commented Jan 7, 2017

you're right, my apologies @oblador over title

@oblador
Copy link
Owner

oblador commented Jan 7, 2017

Haha, no worries 👍 😸

@oblador
Copy link
Owner

oblador commented Jan 7, 2017

Actually I think you might have duplicate installations of react-native itself. Find the culprit by running npm ls | grep " react-native@" and npm ls | grep " react-native-vector-icons@".

@quadsurf
Copy link
Author

quadsurf commented Jan 7, 2017

@oblador

that grep search yields only:
react-native@0.32.1

i did try upgrading to 0.39 too, but that didn't work either, so i reverted back to 0.32.1

this one seems to be the problem with both RNVI errors:
/node_modules/react-native/local-cli/rnpm/core/fixtures/files/package.json

@oblador
Copy link
Owner

oblador commented Jan 7, 2017

Right, that's a copy of my package.json for testing purposes, it shouldn't be picked up by haste/packager so that's why i'm thinking your configs are off. Simply upgrading might not be enough as it will not change your configs, that's why i'm proposing you try with a fresh project.

@quadsurf
Copy link
Author

quadsurf commented Jan 8, 2017

@oblador a fresh project solved it, thank you sooo much for the generous help! i'm new to coding, been coding for less than 4 months now, and I'm always impressed with how eager people are to help... it means a lot, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants