react-lazyload icon indicating copy to clipboard operation
react-lazyload copied to clipboard

Build error: expected string or function, but got: object

Open christophberinger opened this issue 3 years ago • 3 comments

Hey,

thank you for the great library which works great so far. We currently use it in an Astro Js environment within a react component, where it perfectly works in dev mode, but throws a build error like

"Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object."

Typically, this is related to named/default exports and the corresponding import Synatx (see https://bobbyhadz.com/blog/react-element-type-is-invalid-expected-string-but-got), but this is not the solution here.

Do you have any idea, what causes this error and how to fix it?

Thanks in advance.

Cheers, Christoph

christophberinger avatar Jul 14 '22 08:07 christophberinger

@christophberinger I'm getting the same issue. Did you happen to find a fix?

pablodavila95 avatar Sep 14 '22 17:09 pablodavila95

@pablodavila95 hi there, any solutions for this?

yakovlevkll avatar Feb 06 '23 10:02 yakovlevkll

Sorry, I'm no longer using the library. But as far as I can remember, I couldn't find a solution for this. @yakovlevkll

pablodavila95 avatar Feb 06 '23 19:02 pablodavila95