vision-camera-code-scanner
vision-camera-code-scanner copied to clipboard
Compiling JS failed: 1138:3import declaration must be at top level of module...
I installed react-native-vision-camera, then vision-camera-code-scanner I followed the install guide, but I still got error
My babel.config.js:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
[
'react-native-reanimated/plugin',
{
globals: ['__scanCodes'],
},
],
],
};
When I start the project I got this error:
@Szabolcs11 have you been able to fix the error ?
Bump
I figured it out, ran yarn start --clear to clear the cache and it went away.