react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

Multiple versions of Reanimated were detected

Open souna23 opened this issue 3 years ago • 7 comments

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

souna23 avatar Oct 02 '22 23:10 souna23

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?

github-actions[bot] avatar Oct 02 '22 23:10 github-actions[bot]

Can you paste the output of npm ls react-native-reanimated?

tomekzaw avatar Oct 03 '22 16:10 tomekzaw

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]

souna23 avatar Oct 03 '22 21:10 souna23

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?

tomekzaw avatar Oct 04 '22 13:10 tomekzaw

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

souna23 avatar Oct 04 '22 16:10 souna23

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.

tomekzaw avatar Oct 04 '22 18:10 tomekzaw

thank you so mush, i will wait your result

souna23 avatar Oct 04 '22 21:10 souna23

Have you tried setting the resolutions property in the workspace package.json or in package.json inside a single application?

piaskowyk avatar Oct 10 '22 14:10 piaskowyk

this problem is related to my application, i found another folder node-modules in ios folder, i deleted it and problem is fixed

souna23 avatar Oct 11 '22 08:10 souna23

Ok, thanks for notifying me.

piaskowyk avatar Oct 11 '22 09:10 piaskowyk

@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!
 #  
 #  -------------------------------------------

Sub-Zero-1 avatar Oct 18 '22 11:10 Sub-Zero-1

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

swethamadhamshetty avatar Jan 24 '23 06:01 swethamadhamshetty

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

swethamadhamshetty avatar Jan 24 '23 06:01 swethamadhamshetty

#3411

sacru2red avatar Jul 13 '23 06:07 sacru2red