Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element type is invalid: expected a string #680

Open
ademir10 opened this issue Nov 25, 2024 · 0 comments
Open

Element type is invalid: expected a string #680

ademir10 opened this issue Nov 25, 2024 · 0 comments

Comments

@ademir10
Copy link

Describe the bug
A clear and concise description of what the bug is.
After to use this plugin for a long time, we updated to the last version our RN project and also this plugin version, and after that when we call the view to open the camera, we receive this error message:

(NOBRIDGE) ERROR Warning: Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

To Reproduce
import { CameraScreen } from 'react-native-camera-kit';

async function QRcodeReaded(barcode) {
...
}

return (
<KeyboardAvoidingView
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
style={styles.container}>

            <View style={styles.cameraContainer}>

                <CameraScreen
                    // Barcode props
                    scanBarcode={true}
                    onReadCode={(event) => QRcodeReaded(event.nativeEvent.codeStringValue)}
                    showFrame={true}
                    laserColor='red' 
                    frameColor='white'
                />

.
.
.

Expected behavior
Jus open the camera screen to read the qrcode

Screenshots
If the issue is a visual glitch or UI issue please provide screen shots.

Desktop (please complete the following information):
System:
OS: macOS 15.1.1
CPU: (12) arm64 Apple M2 Max
Memory: 124.75 MB / 32.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.10.0
path: ~/.nvm/versions/node/v22.10.0/bin/node
Yarn:
version: 3.6.4
path: /opt/homebrew/bin/yarn
npm:
version: 10.9.0
path: ~/.nvm/versions/node/v22.10.0/bin/npm
Watchman:
version: 2024.07.15.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods:
version: 1.15.2
path: /opt/homebrew/bin/pod
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.0
- iOS 18.0
- macOS 15.0
- tvOS 18.0
- visionOS 2.0
- watchOS 11.0
Android SDK: Not Found
IDEs:
Android Studio: 2024.1 AI-241.18034.62.2411.12071903
Xcode:
version: 16.0/16A242d
path: /usr/bin/xcodebuild
Languages:
Java:
version: 22.0.2
path: /opt/homebrew/opt/openjdk/bin/javac
Ruby:
version: 3.1.4
path: /Users/ademir/.rbenv/shims/ruby
npmPackages:
"@react-native-community/cli":
installed: 15.0.1
wanted: 15.0.1
react:
installed: 18.3.1
wanted: 18.3.1
react-native:
installed: 0.76.3
wanted: 0.76.3
react-native-macos: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: true
newArchEnabled: true

Additional context
There is something to be changed in our code? thank you guys!

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

No branches or pull requests

1 participant