Expo-Barcode-Scanner: Getting undefined error for 'p.default.BarCodeType'

I’ve been building an app that has been running completely fine using “expo start”. Now that I’ve built it into an APK, it seems to not be working. I keep on getting the following error:
E/ReactNativeJS: TypeError: undefined is not an object (evaluating 'p.default.BarCodeType')

Because of the name of the variable in the error, I believe this may be related to the Expo-Barcode-Scanner package that I’m using. I’ve tried to comment out all calls to the component that uses the Expo-Barcode-Scanner package but even with no calls to the package, I still get this error when starting the APK through Android Studio.

When I search for p.default.BarCodeType throughout my project, the only place I can find it is in my index.android.bundle file. I’ve been trying to fix this for hours and feel like I’m hitting a dead end. Please can someone assist? I’d really appreciate that

Hey @rickycoding, I’d recommend exploring these docs Debugging - Expo Documentation


Do you get anything if you search for just “BarCodeType”?

Also, make sure you’re importing the library as per the documentation like this:

import { BarCodeScanner } from 'expo-barcode-scanner';