react-native-reanimated
react-native-reanimated copied to clipboard
Multiple versions of Reanimated were detected
Description
this happend after upgrad to version 2.10.0 with version 2.9.1 everything is good this solution is not working https://docs.swmansion.com/react-native-reanimated/docs/next/fundamentals/troubleshooting/
help please
Steps to reproduce
1.upgrade to 2.10.0
Snack or a link to a repository
https://docs.swmansion.com/react-native-reanimated/docs/next/fundamentals/troubleshooting/
Reanimated version
2.10.0
React Native version
0.69.4
Platforms
Android
JavaScript runtime
JSC
Workflow
React Native (without Expo)
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Android emulator
Device model
No response
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Can you paste the output of npm ls react-native-reanimated?
thank you very much for responding this is what it shows [email protected] /Users/m/Documents/...path to my project ├─┬ @react-navigation/[email protected] │ └── [email protected] deduped └── [email protected]
Hmm, looks like it's okay as only 2.10.0 is installed. Can you try removing node_modules and installing them once again? Do you have a monorepo or a regular project? Can you please prepare a repro so we can replicate the error on our machines?
Hi, yes actually i am using monorepo for both operating systems android and ios, I used this instruction " sudo rm -rf node_modules" to remove the nodes modules file and reinstall them again with npm install and error still exist, all packages are updated, i dont understand here all my dependancies
"@react-native-async-storage/async-storage": "^1.17.9", "@react-native-community/geolocation": "^3.0.1", "@react-native-community/masked-view": "^0.1.11", "@react-navigation/bottom-tabs": "^6.3.2", "@react-navigation/drawer": "^6.4.3", "@react-navigation/native": "^6.0.11", "@react-navigation/stack": "^6.2.2", "appcenter": "^4.4.5", "appcenter-analytics": "4.4.5", "appcenter-crashes": "4.4.5", "axios": "^0.27.2", "chalk": "^5.0.1", "deprecated-react-native-prop-types": "^2.3.0", "eventsource": "^2.0.2", "haversine": "^1.1.1", "latlng-to-zip": "0.0.2", "react": "18.1.0", "react-dom": "^18.1.0", "react-native": "0.70.1", "react-native-android-location-enabler": "^1.2.2", "react-native-code-push": "^7.0.5", "react-native-elements": "^3.4.2", "react-native-geolocation-service": "^5.3.0", "react-native-gesture-handler": "^2.5.0", "react-native-linear-gradient": "^2.6.2", "react-native-maps": "1.3.2", "react-native-permissions": "^3.6.1", "react-native-platform-touchable": "^1.1.1", "react-native-reanimated": "2.10.0", "react-native-safe-area-context": "^4.3.1", "react-native-screens": "^3.15.0", "react-native-snap-carousel": "^3.9.1", "react-native-sse": "^1.1.0", "react-native-url-polyfill": "^1.3.0", "react-native-vector-icons": "^9.2.0", "react-native-webview": "^11.23.0", "react-navigation-header-buttons": "^9.0.1", "react-redux": "^8.0.2", "redux": "^4.2.0", "redux-thunk": "^2.4.1"
I don't know how to prepare a repro, can you give me a little guide please
Thanks for your response. This might be some issue specific to using Reanimated in a monorepo. I will create an example monorepo with an app tomorrow and I will let you know if it works for me.
thank you so mush, i will wait your result
Have you tried setting the resolutions property in the workspace package.json or in package.json inside a single application?
this problem is related to my application, i found another folder node-modules in ios folder, i deleted it and problem is fixed
Ok, thanks for notifying me.
@tomekzaw I have the same issue with the 2.11.0. I can do a pod install successfully with 2.10.0, but 2.10.0 does not work due to monorepo issues. The more, the monorepo issues persisted with 2.11.0 and I had to patch it myself. The path is different for me (version 2.11.0).
build.gradle:
def reactNativeFromProjectNodeModules = file("${rootProject.projectDir}/../node_modules/react-native")
for me it works with:
def reactNativeFromProjectNodeModules = file("${rootProject.projectDir}/../../node_modules/react-native")
Now, I get(version 2.11.0):
[!] Invalid `Podfile` file:
[!] Invalid `RNReanimated.podspec` file: [Reanimated] Multiple versions of Reanimated were detected. Only one instance of react-native-reanimated can be installed in a project. You need to resolve the conflict manually. Check out the documentation: https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/troubleshooting#multiple-versions-of-reanimated-were-detected
Conflict between:
- /Users/abc/Documents/Develop/bla/node_modules/react-native-reanimated
- /Users/abc/Documents/Develop/bla/app/node_modules/react-native-reanimated
.
# from /Users/abci/Documents/Develop/bla/app/node_modules/react-native-reanimated/RNReanimated.podspec:6
# -------------------------------------------
# config = find_config()
> assert_no_multiple_instances(config)
#
# -------------------------------------------
.
# from /Users/aari/Documents/Develop/barmer-frontends/app/ios/Podfile:12
# -------------------------------------------
# target 'baseapp' do
> config = use_native_modules!
#
# -------------------------------------------
npm ls react-native-reanimated
├─┬ [email protected] │ └── [email protected] ├── [email protected] ├─┬ [email protected] │ ├── [email protected] │ └─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] invalid: ">= 3.0.0" from node_modules/@react-navigation/material-top-tabs └── [email protected] deduped
Can you paste the output of
npm ls react-native-reanimated?
├─┬ [email protected] │ └── [email protected] ├── [email protected] ├─┬ [email protected] │ ├── [email protected] │ └─┬ [email protected] │ └── [email protected] deduped └─┬ [email protected] invalid: ">= 3.0.0" from node_modules/@react-navigation/material-top-tabs └── [email protected] deduped