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

Android: New Arch #38

Open
patlux opened this issue Oct 2, 2024 · 1 comment
Open

Android: New Arch #38

patlux opened this issue Oct 2, 2024 · 1 comment

Comments

@patlux
Copy link

patlux commented Oct 2, 2024

It works fine on iOS, but on android I'm getting the following error

> Configure project :react-native-vision-camera
[VisionCamera] Thank you for using VisionCamera ❤️
[VisionCamera] If you enjoy using VisionCamera, please consider sponsoring this project: https://github.com/sponsors/mrousavy
[VisionCamera] node_modules found at /Users/.../node_modules
[VisionCamera] VisionCamera_enableFrameProcessors is set to true!
[VisionCamera] react-native-worklets-core found, Frame Processors are enabled!
[VisionCamera] VisionCamera_enableCodeScanner is set to false!
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (34.0.0) for Android Gradle Plugin 8.5.0.
Android SDK Build Tools 34.0.0 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :mgcrea_vision-camera-barcode-scanner:generateCodegenSchemaFromJavaScript FAILED
node:fs:1640
  const stats = binding.lstat(
                        ^

Error: ENOENT: no such file or directory, lstat '/Users/patwoz/dev/.../node_modules/@mgcrea/vision-camera-barcode-scanner/src'
    at Object.lstatSync (node:fs:1640:25)
    at /Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js:108:15
    at Array.flatMap (<anonymous>)
    at expandDirectoriesIntoFiles (/Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js:107:6)
    at combineSchemasInFileList (/Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js:123:28)
    at combineSchemasInFileListAndWriteToFile (/Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema.js:142:20)
    at Object.<anonymous> (/Users/patwoz/dev/.../node_modules/@react-native/codegen/lib/cli/combine/combine-js-to-schema-cli.js:76:1)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'lstat',
  path: '/Users/patwoz/dev/.../node_modules/@mgcrea/vision-camera-barcode-scanner/src'
}

Node.js v20.17.0

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':mgcrea_vision-camera-barcode-scanner:generateCodegenSchemaFromJavaScript'.
> Process 'command 'node'' finished with non-zero exit value 1

Any idea?

@patlux
Copy link
Author

patlux commented Oct 2, 2024

Ok I just copied node_modules/@mgcrea/vision-camera-barcode-scanner/dist to node_modules/@mgcrea/vision-camera-barcode-scanner/src and it works fine on android.

So either the package must ship the src folder or it must be configured to dist somehow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant