react-native-mock
react-native-mock copied to clipboard
Can't install due to duplicate naming
Related to #57 ... perhaps we need to do something like this? https://github.com/Thomas101/react-native-fence-html/commit/ff335a4140164258f7d74abfb6b6625a74ee17c5 /cc @sibeliusseraphini
https://github.com/facebook/react-native/issues/3558
Can you please explain what you mean by 'duplicate name', or at least provide a stacktrace for the error?
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
When is this happening. Is this when you run the packager? @sibeliusseraphini @niftylettuce
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.
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
@niftylettuce is this still an issue? If not please close.