Closed LucienD closed 10 months ago
Got a similar issue... It's due to a specific behavior from esbuild, see here : https://github.com/evanw/esbuild/pull/1849 (first paragraph of the "New behavior" section)
The fact you did set "type": "module" on your package, make esbuild convert import MarkerClusterGroup from 'react-leaflet-cluster'
to an object like { default: MarkerClusterGroup }
, and not the MarkerClusterGroup
function itself... so you get an error like "got: object"
My code:
My package.json:
The error:
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: object.
I don't understand why..
Thanks for the help