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
Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. #167
Comments
Thanks for using this component. : ) I am wondering how did you know this issue was caused by the checkbox. Is there any possibility that another lib caused this issue? Because I can not reproduce this issue in my environment just only with the checkbox. |
@nicholaslee119 Server Error:Uncaught 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 This is my import: I used the State and HandleChange to receive the data: |
Hi, I have the exact same error. I checked my package, yarn lock and podfile but I don't have any possible conflicts with another checkbox. I know the checkbox is the issue because since I've installed it it crashes even without importing it ! React native version 0.67.4 |
@nicholaslee119 I have the same error.. it is working fine in Android emulator, however, no luck in RNW |
same |
same here. and i have verfiied, it's not another lib. i precise, it's in expo on web emulation, i will try in android view. and it's the same |
same |
Also have this same error on v0.5.12, react-native v0.69.6. Verified it's the imported CheckBox causing this error.
If I |
It appears this package just isn't supported outside of ios, android, or windows. The primary source file (https://github.com/react-native-checkbox/react-native-checkbox/blob/develop/src/js/CheckBox.ts) on a web platform will circularly reference itself, as you can see in the final dist when you install the package. |
same here for the Web version |
Hello everyone,
I am trying to use this checkbox in a NextJS + React Native Web app, but am receiving the following error when I try to insert the CheckBox code:
Server Error
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.
Source code:
I have checked several things, such as my import:
But this should be OK.
Does anyone have an idea what could be going wrong?
Thanks in advance!
The text was updated successfully, but these errors were encountered: