Skip to content

🐛Issue with migrating to version 5.0.0 #3966

@TanyaZhecheva

Description

@TanyaZhecheva

Prerequisites

Reproduction

l

Steps to reproduce

I followed the steps to migrate to the new version

  1. yarn add react-native-vision-camera@5
  2. yarn add react-native-nitro-modules react-native-nitro-image
  3. Permissions were already added to the app.json, but still i made a check if everything is ok there
  4. Tried to run it locally with : npx expo start, npx expo prebuild
    or npx expo start --clear - none of them worked. Deleted node modules, installed them, still didnt work. Most of the cases with module errors is that i need to make a new development/production build, which i tried but i still get the same error (build doesnt start)
  5. Removed all of my imports and logic where vision camera is used, still the issue persists.
    This obviosly happens on both android/ios because i cant even start it locally.

What did you expect to happen?

The local build to run successfully.

What actually happened?

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/dcvx/Desktop/green/product-scan/client/node_modules/react-native-vision-camera/lib/CameraDevices' imported from /Users/dcvx/Desktop/green/product-scan/client/node_modules/react-native-vision-camera/lib/index.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/dcvx/Desktop/green/product-scan/client/node_modules/react-native-vision-camera/lib/CameraDevices' imported from /Users/dcvx/Desktop/green/product-scan/client/node_modules/react-native-vision-camera/lib/index.js
at finalizeResolution (node:internal/modules/esm/resolve:283:11)
at moduleResolve (node:internal/modules/esm/resolve:952:10)
at defaultResolve (node:internal/modules/esm/resolve:1188:11)
at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:642:12)
at #cachedDefaultResolve (node:internal/modules/esm/loader:591:25)
at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:347:53)
at new ModuleJobSync (node:internal/modules/esm/module_job:333:34)
at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:320:11)
at loadESMFromCJS (node:internal/modules/cjs/loader:1371:24)
at Module._compile (node:internal/modules/cjs/loader:1511:5)

Affected platforms

Android (device), iOS (device)

Device(s) affected

Iphone 12 mini v-26.5, Samsung s20 FE v-13

VisionCamera version

tried with both 5.0.11 and 5.0.0

React Native version

0.79.5

React Native architecture

New Architecture (Fabric / bridgeless)

Features being used

  • Preview
  • Photo capture
  • Video capture
  • Frame Processors (worklets)
  • Skia Frame Processors
  • Code/Barcode Scanner
  • Location metadata
  • Multi-cam
  • Depth data
  • HDR / custom dynamic range
  • Custom format / FPS / resolution

Relevant logs / stack trace

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/dcvx/Desktop/green/product-scan/client/node_modules/react-native-vision-camera/lib/CameraDevices' imported from /Users/dcvx/Desktop/green/product-scan/client/node_modules/react-native-vision-camera/lib/index.js
Error [ERR_MODULE_NOT_FOUND]: Cannot find module '/Users/dcvx/Desktop/green/product-scan/client/node_modules/react-native-vision-camera/lib/CameraDevices' imported from /Users/dcvx/Desktop/green/product-scan/client/node_modules/react-native-vision-camera/lib/index.js
    at finalizeResolution (node:internal/modules/esm/resolve:283:11)
    at moduleResolve (node:internal/modules/esm/resolve:952:10)
    at defaultResolve (node:internal/modules/esm/resolve:1188:11)
    at ModuleLoader.defaultResolve (node:internal/modules/esm/loader:642:12)
    at #cachedDefaultResolve (node:internal/modules/esm/loader:591:25)
    at ModuleLoader.getModuleJobForRequire (node:internal/modules/esm/loader:347:53)
    at new ModuleJobSync (node:internal/modules/esm/module_job:333:34)
    at ModuleLoader.importSyncForRequire (node:internal/modules/esm/loader:320:11)
    at loadESMFromCJS (node:internal/modules/cjs/loader:1371:24)
    at Module._compile (node:internal/modules/cjs/loader:1511:5)

Additional context

No response

Submission

  • The reproduction I linked is either (preferred) a PR against this repo that adds a failing harness test following the harness-tests README, or (fallback) a public repo that reproduces the bug on a fresh clone. I understand the issue will be closed without one.
  • I pasted logs as text (not screenshots).
  • I wrote this report in my own words. I did not paste AI-generated descriptions of the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions