react-native-router-flux: Duplicate versions of react-native being installed
react-native-router-flux v3.38.1 react-native v0.42.3
yarn install is causing react-native v0.42.3 and react-native v0.41.1 to be installed
Should react and react-native be installed as a peerDependency for react-native-router-flux?
To repro:
react-native init {projectName} --version=0.42.3 cd {projectName} yarn add react-native-router-flux npm start
You should see
Failed to build DependencyGraph: @providesModule naming collision:
Duplicate module name: react-animated
Paths: /Users/bdewitt/sandbox/break/node_modules/react-native-router-flux/node_modules/react-native/Libraries/Animated/release/package.json collides with /Users/bdewitt/sandbox/break/node_modules/react-native/Libraries/Animated/release/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-animated
Paths: /Users/bdewitt/sandbox/break/node_modules/react-native-router-flux/node_modules/react-native/Libraries/Animated/release/package.json collides with /Users/bdewitt/sandbox/break/node_modules/react-native/Libraries/Animated/release/package.json
This error is caused by a @providesModule declaration with the same name across two different files.
at HasteMap._updateHasteMap (/Users/bdewitt/sandbox/break/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:158:13)
at p.getName.then.name (/Users/bdewitt/sandbox/break/node_modules/react-native/packager/src/node-haste/DependencyGraph/HasteMap.js:133:31)
yarn add react-native-router-flux@3.38.0
Should succeed
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 53
- Comments: 40 (2 by maintainers)
Commits related to this issue
- Fixed Duplicate versions of react-native (#1885) This PR fixed #1803 issue. — committed to aksonov/react-native-router-flux by abdurrahmanekr 7 years ago
- Fixed Duplicate versions of react-native (#1885) This PR fixed #1803 issue. — committed to Justkant/react-native-router-flux by abdurrahmanekr 7 years ago
- Fixed Duplicate versions of react-native (#1885) This PR fixed #1803 issue. — committed to zxcpoiu/react-native-router-flux by abdurrahmanekr 7 years ago
- V4 announcement, v3 is obsolete now; closes #1,#2,#3,#4,#5,#6,#7,#8,#9,#10,#11,#12,#13,#14,#15,#16,#17,#18,#19,#20,#21,#22,#23,#24,#25,#26,#27,#28,#29,#30,#31,#32,#33,#34,#35,#36,#37,#38,#39,#40,#41,#... — committed to aksonov/react-native-router-flux by aksonov 7 years ago
- V4 docs; closes #1,closes #2,closes #3,closes #4,closes #5,closes #6,closes #7,closes #8,closes #9,closes #10,closes #11,closes #12,closes #13,closes #14,closes #15,closes #16,closes #17,closes #18,cl... — committed to aksonov/react-native-router-flux by aksonov 7 years ago
Got wrecked by this too. Fixed with the rollback to 3.38.0
reinstall 3.38.0 for now npm install --save react-native-router-flux@3.38.0
I’ve been tearing my hair out over this issue, glad to come across the root of the problem
Removing
react-native-router-flux
from my package.json and reinstalling node_modules causes no errors so it’s definitelyreact-native-router-flux
.Came here to post the same issue, looks like it was accidentally added to the dependencies in this commit: https://github.com/aksonov/react-native-router-flux/commit/34e2d7ac7eb09489c2fd7f19844bd38e27e969fc
I believe It should be listed as a peerDependency instead
yeah this has been destroying my day as well. as a quick work around, you can just go delete the dupe of react-native out of the node_modules folder within react-native-router-flux. Ugly, but will at least get you up and running for the time being
Same issue
Posting the above for convenience copy & paste 😄
yep, either rollback or remove the folder manually, thanks for the workarounds
Same here, please update the package
same issue, please help to fix
Waiting for the fix I rollback to react-native-router-flux@3.30.1
It’s not related to yarn I believe. Because even if I install it with npm I get the same issue. I deleted my node_modules folder and cleared the npm cache, but the issue was persistent. Currently, I went ahead with a workaround which I read on a GitHub issue where I have to delete the node_modules/react-native-router-flux/node_modules/react-native package. I hope they fix this issue soon.
@abdurrahmanekr @asokol Can we publish this into npm its still showing 3.39.1 as the latest https://www.npmjs.com/package/react-native-router-flux
What worked for me was this sequence:
watchman watch-del-all rm -rf node_modules && npm install npm uninstall react-native-router-flux npm install --save react-native-router-flux@3.38.0 rm -fr $TMPDIR/react-* npm cache clean npm install --save react@16.0.0-alpha.6 npm start – --reset-cache
Rolling back to v0.38.0 or just deleting the react-native folder inside react-native-router-flux/node_modules/ and also delete symlink to react-native inside react-native-router-flux/node_modules/.bin/ will work for now.
Same by me, had to remove the react-native directory inside react-native-router-flux manually to make things work.