sghiassy / react-native-sglistview

SGListView is a memory minded implementation of React Native's ListView
MIT License
743 stars 72 forks source link

Duplicate module name: ReactNative #53

Closed markgoodyear closed 7 years ago

markgoodyear commented 7 years ago

When install the package, packager throws up this error:

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: ReactNative
  Paths: /{project path here}/node_modules/react-native-sglistview/node_modules/react-native/Libraries/Renderer/src/renderers/native/ReactNative.js 
  collides with /{project path here}/node_modules/react-native/Libraries/react-native/ReactNative.js

I'm using RN 0.36. Any ideas on how to fix the issue? Cheers!

younisshah commented 7 years ago

@markgoodyear Update your react-native version to 0.41.2

markgoodyear commented 7 years ago

@younisshah Unfortunately I'm not able to update at the moment (due to the project). Is there anyway you could add support for lower versions? If not, I think it'd be a great idea to add in the versions supported in the readme.

sghiassy commented 7 years ago

I've wondered how RN modules version themselves to target different RN versions. Are there any good examples of this?

yjb94 commented 7 years ago

@markgoodyear will this help? rm -r node_modules/react-native-sglistview/node_modules

laukaichung commented 7 years ago

@yjb94 It works! Does it have anything to do with the RN 0.42 update?

markgoodyear commented 7 years ago

@yjb94 — I've not tried that. I've managed to have some time out to update the RN version in the project I'm working on (not tested sglistview yet as it's still in progress, big jump so lots of breaking changes to fix first), but good to hear it works from @stonecold123!

markgoodyear commented 7 years ago

@yjb94, after updating to the latest RN version (0.42) I get:

Duplicate module name: react-native-vector-icons

Removing the node_modules manually works though.

diegorodriguesvieira commented 7 years ago

+1

sghiassy commented 7 years ago

I updated the dependency structure to avoid installing react-native under its own node_modules folder. I tested the changes in an example app and they worked for me - so I believe this problem is fixed.

Please reopen and provide repo steps if the newest version doesn't solve the problem.