React Native DuplicateError: Duplicated files or mocks
Solution 1:
The cause for me was that I had two different package.json
files with the same value for the name
property.
Solution 2:
I had took back up of node_module back in project root as "xnode_module". So I have delete back up, it works for me.
Solution 3:
cd ios/
rm -rf build/
xcodebuild clean
cd ..
react native run ios
or check inside project you have must same name project inside
Solution 4:
Because you have two package.json
file in your project like package.json
and another\\package.json
in a sub directory. Also you've get more information on your terminal and in most of times it contains the path :
All you have to do is delete the duplicated file in sub directory Not Main file.