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

"Expected directory 'node_modules/react-native/android' to contain exactly one file, however, it contains no files"🐛 #1427

Closed
3 of 4 tasks
jason840917gmail opened this issue Jan 24, 2023 · 5 comments · Fixed by #1466
Labels
🐛 bug Something isn't working

Comments

@jason840917gmail
Copy link

What were you trying to do?

Just started a new react native project and install all the necessaries dependencies to access the camera. I had seen that this issue always comes back with every new version of RN or React native vision camera.
Dependencies:

"@react-navigation/drawer": "^6.5.7",
    "@react-navigation/native": "^6.1.2",
    "latest": "^0.2.0",
    "patch-package": "^6.5.1",
    "react": "18.2.0",
    "react-native": "^0.71.1",
    "react-native-gesture-handler": "^2.9.0",
    "react-native-reanimated": "^2.14.4",
    "react-native-safe-area-context": "^4.5.0",
    "react-native-screens": "^3.19.0",
    "react-native-vision-camera": "^2.15.2"

Reproduceable Code

No response

What happened instead?

image

Relevant log output

No response

Device

Android 12

VisionCamera Version

2.15.2

Additional information

@jason840917gmail jason840917gmail added the 🐛 bug Something isn't working label Jan 24, 2023
@jason840917gmail
Copy link
Author

found this on the last release of react native:
Starting from React Native 0.71, we're not shipping the /android folder inside the React Native NPM package
anymore due to sizing constraints on NPM. The Android artifacts are distributed via Maven Central.
You can read more about it in this RFC:
react-native-community/discussions-and-proposals#508

If you're a library author and you're manipulating the React Native .aar files, to extract headers,
extract .so files or do anything with it, you're probably doing something wrong. React Native
0.71 ships with all the necessary logic to let you consume it transparently by just using:

implementation("com.facebook.react:react-android")
// or to keep backward compatibility with older versions of React Native:
implementation("com.facebook.react:react-native:+")

@DanielGannage
Copy link

Can confirm, I get the same error with RN 0.71.1

Currently our project cannot barcode scan, which requires older and deprecated modules that are in need of patching. How long do you think it will take before these artifacts get put in the right spot (i.e. the module gets fixed)?

@markjsc
Copy link

markjsc commented Jan 26, 2023

Confirming that we're seeing the same thing with React Native 0.71.1.

Would definitely appreciate any updates or workarounds. We're going to stay on React Native 0.70.x until this is resolved.

Side note - Thanks for all the work on this project!!

@zzz08900
Copy link
Contributor

Duplicate of #1418

@myselfuser1
Copy link

Try this https://www.youtube.com/playlist?list=PLQhQEGkwKZUrempLnmxjt7ZCZJu1W3p2i

@mrousavy
Copy link
Owner

Hey! I've rewritten the entire Android codebase of VisionCamera from CameraX to Camera2 in the efforts of ✨ VisionCamera V3.

I just now completed the Camera2 rewrite and I believe the core structure is running, but there might be some edge cases to iron out. Can you try and test the PR #1674 for me to see if you can still reproduce this issue here?

Here's an instruction on how you can test that: #1674 (comment)

If the issue cannot be reproduced with that version/PR anymore, then hoorayy, I fixed it! 🎉
Otherwise please let me know and I'll keep this issue open to keep track of it.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants