vision-camera-code-scanner icon indicating copy to clipboard operation
vision-camera-code-scanner copied to clipboard

Compiling JS failed: 1138:3import declaration must be at top level of module...

Open Szabolcs11 opened this issue 1 year ago • 4 comments

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: 332984453_1586796391744764_5378288796359022461_n

Szabolcs11 avatar Mar 12 '23 00:03 Szabolcs11

@Szabolcs11 have you been able to fix the error ?

destinyifeh avatar May 15 '23 09:05 destinyifeh

Bump

TideOPL avatar May 16 '23 23:05 TideOPL

I figured it out, ran yarn start --clear to clear the cache and it went away.

TideOPL avatar May 17 '23 13:05 TideOPL