react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

A problem occurred evaluating project ':react-native-vision-camera'🐛

Open Bamorem opened this issue 4 years ago • 6 comments

What were you trying to do?

I was running my app without issue with the version 2.10.0, but since the update of 2.11.0 the build failed with an exception.

on the /react-native-vision-camera/android/build.gradle' line: 8 it's looking for the file /react-native-vision-camera/node_modules/react-native/ReactAndroid/gradle.properties which doesn't exist (No such file or directory).

I tried to clean the caches but still happening Screen Shot 2022-01-03 at 10 48 22

Reproduceable Code

"react-native-vision-camera": "^2.11.0",

What happened instead?

FAILURE: Build failed with an exception.

Relevant log output

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/yohanbalassiano/Sites/Deelt/app/deelt/node_modules/react-native-vision-camera/android/build.gradle' line: 8

* What went wrong:
A problem occurred evaluating project ':react-native-vision-camera'.
> /Users/yohanbalassiano/Sites/Deelt/app/deelt/node_modules/react-native-vision-camera/node_modules/react-native/ReactAndroid/gradle.properties (No such file or directory)

Device

OnePlus Nord

VisionCamera Version

2.11.0

Additional information

Bamorem avatar Jan 03 '22 08:01 Bamorem

Hi, thank you for the report.

That bug has already been reported in a comment before, it's because the path to the node_modules folder seems to be wrong. I will take a look soon, for now you can hotpatch it using patch-package :)

mrousavy avatar Jan 03 '22 08:01 mrousavy

Okay had some free time to investigate this - can you please try if #704 works for you?

mrousavy avatar Jan 03 '22 11:01 mrousavy

Hi @mrousavy, I had the same issue. When using the fix/monorepo-support I get the following.

FAILURE: Build failed with an exception.

* Where:
Build file '/home/jens/projects/craftzing/extraHorizon/fibricheck_react_native/node_modules/react-native-vision-camera/android/build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':react-native-vision-camera'.
> /home/jens/projects/craftzing/extraHorizon/fibricheck_react_native/node_modules/react-native-vision-camera/node_modules/react-native/ReactAndroid/gradle.properties (No such file or directory)

If I change line 19

-def nodeModules = findNodeModules(projectDir)
+def nodeModules = findNodeModules(rootDir)

It does build

jensdev avatar Jan 03 '22 11:01 jensdev

Maybe your node_modules/react-native-vision-camera folder also has another node_modules/ folder inside? if yes, delete that.

I'll try your suggested solution if that works here ...

mrousavy avatar Jan 03 '22 12:01 mrousavy

Let's see if #706 builds in the CI.

mrousavy avatar Jan 03 '22 12:01 mrousavy

Thanks @jensdev its work for me

ussef11 avatar Feb 01 '24 09:02 ussef11