Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

__scanCodes is not defined #121

Open
Pietro-Putelli opened this issue Jan 4, 2023 · 4 comments
Open

__scanCodes is not defined #121

Pietro-Putelli opened this issue Jan 4, 2023 · 4 comments

Comments

@Pietro-Putelli
Copy link

Pietro-Putelli commented Jan 4, 2023

Hi, I'm getting the following error, as a lot of other people report on issues.

__scanCodes is not defined

It occurs both on iOS and Android.

Here's my libraries version:

"react-native": "^0.70.6",
"react-native-vision-camera": "2.9.4",
"vision-camera-code-scanner": "^0.2.0",
"react-native-reanimated": "^2.13.0",

And finally the babel.config.js

module.exports = {
  presets: ["module:metro-react-native-babel-preset"],
  plugins: [
    ["react-native-reanimated/plugin", { globals: ["__scanCodes"] }],
    "module:react-native-dotenv",
  ],
};

I have also tried to patch react-native-vision-camera, following this instructions:
#79 (comment)

Update, the following error occurs while trying to install CocoaPods:

Screenshot 2023-01-04 at 4 52 05 PM

Does someone have a solution for this issue? Or does a patch exist to solve the problem?
Thank you

@hematenergi
Copy link

it also happen to me. idk how to fix this.

@Salem-Abderaouf
Copy link

@hematenergi @Pietro-Putelli try to import react-native-gesture-handler in top level of index.js file

@navaspavil
Copy link

try yarn start --resetCache

@ulexxander
Copy link

yarn start --reset-cache solved the issue in my case.

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

No branches or pull requests

6 participants
@navaspavil @Salem-Abderaouf @hematenergi @ulexxander @Pietro-Putelli and others