-
Notifications
You must be signed in to change notification settings - Fork 23
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
Getting Element type is invalid on prod build using vite #226
Comments
Hi! I have the same problem .... if someone managed to fix it and the solution it would be very cool thanks |
Running into the same issue when using build scripts. |
as temporary fix for vite import ReactFsLightbox from 'fslightbox-react';
const FsLightbox = ReactFsLightbox.default
? ReactFsLightbox.default
: ReactFsLightbox; then use |
Hi, I tried using and it works but I get this message on vscode and when I try to build it:
What can I do now? |
When I run it locally (vite) it works as expected but once I deployed it to prod (using vercel) it is throwing this error:
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.
<button type="button" onClick={() => setToggler(!toggler)}> Toggle Lightbox </button> <FsLightbox toggler={toggler} sources={[ "https://i.imgur.com/fsyrScY.jpg", "https://www.youtube.com/watch?v=3nQNiWdeH2Q", "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4", ]} />
The text was updated successfully, but these errors were encountered: