-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monorepo - Multiple versions of Reanimated were detected #5029
Comments
Hi @Aure77. We do have a GitHub Action that checks if Reanimated builds properly in a monorepo - try to follow the steps we take there and see if it works for you. |
Monorepo template in action use nohoist workspaces (duplicated deps on each workspace = more disk space / time). This should not be necessary if hoisting is done correctly... |
This seems more a workaround (This add I also provide a repro project here: https://github.com/Aure77/react-native-yarn-hoist-issue |
I noticed that in your repro there are more duplicated packages than just What I noticed is when you remove Installing Luckily, the error you refer to will be gone with #4914 and the whole mechanism of duplicate Reanimated detection reworked. |
Currently having the same issue, my temporary solution is to use the latest |
Closing since #4914 is already merged. In the mentioned PR we get rid of the cumbersome check mentioned which caused this issue. |
Description
In a monorepo, yarn workspace doesn't hoist react-native-reanimated dependency & duplicate it on each workspace. I don't understand why.
"why" command say that "react-native-reanimated" dep is hoisted. But if I try to find react-native-reanimated into node_modules I found multiple record:
So it's not only hoisted to root node_modules...
I use the exact same version of "react-native-reanimated" in my workspaces (I also try to force
resolutions
in root package)If I try to found every ref of this deps, I found that:
and most of third party libs are referencing react-native-reanimated as peer or dev dependency...
So Why this lib is not hoisted at root ?
Steps to reproduce
react-native-reanimated
& lib that dependent on it (ex:react-native-reanimated-carousel
)yarn install
find . -name "react-native-reanimated" -type d
outputSnack or a link to a repository
https://github.com/Aure77/react-native-yarn-hoist-issue
Reanimated version
3.4.2
React Native version
0.70.4
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Paper (Old Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: