RN 0.39.2
This may sound like a duplicate of React-Native Packager Failure: Duplicate module name but there aren't any real fixes in there, just workarounds. There are others but they are for older versions of RN or are similar but different root causes. I have my own workaround (see below) but I'd like to actually solve the problem instead of having to do this workaround five times a day.
The error:
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: react-native-vector-icons
Paths: /Users/collumj/research/kishar-nine/ios/build/Build/Products/Debug-iphonesimulator/kisharNine.app/package.json
collides with
/Users/collumj/research/kishar-nine/node_modules/react-native/local-cli/core/__fixtures__/files/package.json
The workaround (for me):
rm -rf android ios
git reset --hard
npm start
There must be a way to actually resolve this. Did this package not link properly? I installed it when I added in NativeBase (http://nativebase.io/docs/v0.5.13/getting-started).
Update: also tried unlinking the react-native-vector-icons
library (because apparently you don't need to? unsure, the linking may be redundant in the instructions). Anyway, it didn't work, same error.
Edit: OK this may not have actually worked, checking now...
The solution to this was to use
react-native unlink
to unlink thereact-native-vector-icons
library. I think thenative-base
library's instructions are out of date about the need to use link. Maybe? Not really sure but I can say that after unlinking I can still use icons:Renders fine.