Skip to content
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

Multiple versions detected - Symlinks don't work anymore #4583

Closed
enchorb opened this issue Jun 16, 2023 · 12 comments
Closed

Multiple versions detected - Symlinks don't work anymore #4583

enchorb opened this issue Jun 16, 2023 · 12 comments
Labels
Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android

Comments

@enchorb
Copy link

enchorb commented Jun 16, 2023

Description

Getting the error Multiple versions of Reanimated were detected for any version of gesture handler above 3.1.0. on Android. Runs fine on iOS.

It counts symlinks as a multiple version now which many monorepo providers do (ie. Nrwl).

* What went wrong:
Execution failed for task ':react-native-reanimated:assertNoMultipleInstances'.
> 
 [react-native-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/name/Documents/Code/company/apps/mobile/app_name/node_modules/react-native-reanimated
  - /Users/name/Documents/Code/company/node_modules/react-native-reanimated

The same issue also happens for gesture handler versions above 2.9.0

* What went wrong:
Execution failed for task ':react-native-gesture-handler:assertNoMultipleInstances'.
> 
  [react-native-gesture-handler] Multiple versions of Gesture Handler were detected. Only one instance of react-native-gesture-handler can be installed in a project. You need to resolve the conflict manually. Check out the documentation: https://docs.swmansion.com/react-native-gesture-handler/docs/troubleshooting#multiple-instances-of-gesture-handler-were-detected 
  
  Conflict between: 
  - /Users/name/Documents/Code/company/apps/mobile/app_name/node_modules/react-native-gesture-handler
  - /Users/name/Documents/Code/company/node_modules/react-native-gesture-handler

Steps to reproduce

Set up Nx starter RN project with gesture handler

Snack or a link to a repository

N/A

Reanimated version

Above 3.1.0

React Native version

0.71.11

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@enchorb enchorb added the Needs review Issue is ready to be reviewed by a maintainer label Jun 16, 2023
@github-actions github-actions bot added the Missing repro This issue need minimum repro scenario label Jun 16, 2023
@github-actions
Copy link

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 github-actions bot added the Platform: Android This issue is specific to Android label Jun 16, 2023
@enchorb enchorb changed the title Multiple versions of Gesture Handler were detected - Symlink Multiple versions detected - Symlinks don't work anymore Jun 16, 2023
@Latropos
Copy link
Contributor

Latropos commented Jun 16, 2023

I am not sure if this is a bug or the expected behaviour @tomekzaw

@meypod
Copy link

meypod commented Jul 5, 2023

I'm also experiencing this on trying to move to a mono repo
for now excluding the task from gradle using -x :react-native-reanimated:assertNoMultipleInstances is what I do

@chunghn
Copy link

chunghn commented Jul 10, 2023

I encountered the above issue with IOS build, while Android build works fine.

    "react-native-gesture-handler": "~2.9.0",
    "react-native-reanimated": "~2.14.4",

@zahinafsar
Copy link

Facing the same issue. Did anyone find any solution at least any patch or temporary trick?

@zahinafsar
Copy link

Found a simple fix

Add the line in ./adroid/build.gradle

disableMultipleInstancesCheck=true

@Eli-Nathan
Copy link

Adding disableMultipleInstancesCheck=true to either build.gradle or gradle.properties fixes it.
Are there any plans to add a permanent fix for this? Would adding that flag to the the gradle settings have a knock-on effect for other libraries?

The error message has a link that's only available on the V2 docs and the solution using resolutions in package.json doesn't work with symlinks.

Using Reanimated v3.4.2

@tomekzaw
Copy link
Member

@Eli-Nathan In PR #4914 we get rid of this check in favor of a different approach. This will be available in 3.5.0 soon.

@Latropos
Copy link
Contributor

Closing since #4914 is already merged

@Eli-Nathan
Copy link

@tomekzaw I have version 3.5.4 but the multiple instance check still seems to be present.
Have the changes from #4914 been released?

@Latropos
Copy link
Contributor

No, they haven't been released yet. New release will be soon (within a week or two).

@KonKarakaxidis
Copy link

KonKarakaxidis commented Oct 26, 2023

How can I use disableMultipleInstancesCheck for expo projects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Missing repro This issue need minimum repro scenario Needs review Issue is ready to be reviewed by a maintainer Platform: Android This issue is specific to Android
Projects
None yet
Development

No branches or pull requests

8 participants