vision-camera-code-scanner
vision-camera-code-scanner copied to clipboard
__scanCodes is not defined
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:
https://github.com/rodgomesc/vision-camera-code-scanner/issues/79#issuecomment-1278937809
Update, the following error occurs while trying to install CocoaPods:

Does someone have a solution for this issue? Or does a patch exist to solve the problem? Thank you
it also happen to me. idk how to fix this.
@hematenergi @Pietro-Putelli try to import react-native-gesture-handler in top level of index.js file
try yarn start --resetCache
yarn start --reset-cache solved the issue in my case.