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

Can't install due to duplicate naming

Open niftylettuce opened this issue 9 years ago • 7 comments
trafficstars

Related to #57 ... perhaps we need to do something like this? https://github.com/Thomas101/react-native-fence-html/commit/ff335a4140164258f7d74abfb6b6625a74ee17c5 /cc @sibeliusseraphini

niftylettuce avatar May 30 '16 05:05 niftylettuce

https://github.com/facebook/react-native/issues/3558

niftylettuce avatar May 30 '16 05:05 niftylettuce

Can you please explain what you mean by 'duplicate name', or at least provide a stacktrace for the error?

RealOrangeOne avatar May 30 '16 07:05 RealOrangeOne

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: ViewportMetrics
  Paths: app/node_modules/react-native-mock/node_modules/react/lib/ViewportMetrics.js collides with app/node_modules/react/lib/ViewportMetrics.js

This error is caused by a @providesModule declaration with the same name accross two different files.
Error: @providesModule naming collision:
  Duplicate module name: ViewportMetrics
  Paths:app/node_modules/react-native-mock/node_modules/react/lib/ViewportMetrics.js collides with app/node_modules/react/lib/ViewportMetrics.js

cc @niftylettuce

sibelius avatar May 30 '16 14:05 sibelius

When is this happening. Is this when you run the packager? @sibeliusseraphini @niftylettuce

RealOrangeOne avatar May 30 '16 15:05 RealOrangeOne

Looks like react is installed twice (once in your node_modules folder - as it should be) and once inside the node_modules folder of the react-native-mock module. Which npm version are you using? This https://github.com/lelandrichardson/react-native-mock/pull/55 will probably fix that error. Until then you can try to remove all node_modules and reinstall - if you install [email protected] first and then react-native and after that react-native-mock it should be finde.

ZauberNerd avatar May 30 '16 15:05 ZauberNerd

This looks like a problem with the way node 4 handles dependancies, i've seen it before. If you remove that file from inside the node_modules of react-native-mock, it'll work. Until I push out a release mid next-week, that's what'll have to do

RealOrangeOne avatar May 30 '16 15:05 RealOrangeOne

@niftylettuce is this still an issue? If not please close.

RealOrangeOne avatar Aug 18 '16 09:08 RealOrangeOne