Duplicate module name: react-native-vector-icons

When I install NativeBase and React-Native-Router-Flux in my response project, I get this error:

Failed to build DependencyGraph: @providesModule naming collision: Duplicate module name: react-native-vector-icons Paths: /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native-router-flux/node_modules/react-native/local-cli/core/__fixtures__/files/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: /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/local-cli/core/__fixtures__/files/package.json collides with /Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native-router-flux/node_modules/react-native/local-cli/core/__fixtures__/files/package.json This error is caused by a @providesModule declaration with the same name across two different files. at HasteMap._updateHasteMap (/Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:159:13) at p.getName.then.name (/Users/vittori/Desktop/repos/GitHubExamples/native-starter-kit/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:134:31) 
+6
source share
4 answers

The solution is published here.

yarn add react-native-router-flux@3.38.0

+5
source

You should be able to update react-native-router-flux using: npm i react-native-router-flux --save

It may happen that trying to restart the fault-tolerant packer again can be useful:

1. Clear watchman watches: `watchman watch-del-all`. 2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`. 3. Reset packager cache: `rm -fr $TMPDIR/react-*` or `npm start --reset-cache`.

As soon as you try to run the package again, you will see the following:

Failed to build DependencyGraph: @providesModule naming collision: Duplicate module name

You may need to start the npm installation again for reaction-native-router-flux.

0
source

If you work with yarn, run this command. yarn add react-native-router-flux@3.38.0

And if you are working with npm, run this command. npm install react-native-router-flux@3.38.0 --save

Also you are still getting this problem, please downgrade native-native to version 0.41.2.

Then it will work.

0
source

NativeBase 2.1.4 solves this problem

0
source

All Articles