You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our project moved to vite 8 and now we're getting react error 130:
Element type is invalid: expected a string (for built-in components) or a class/function
(for composite components) but got: object.
This is with v1.31.12 and this import:
importReactJsonfrom'@microlink/react-json-view';
There seems to be an interop/export-shape problem with @microlink/react-json-view (UMD/CJS wrapping can make a “default import” resolve to a module object, and React then throws: “got: object”).
We worked around the issue by importing the module namespace and normalizing to the actual component (default or reactJsonView) before rendering:
Activity
Kikobeats commentedon Mar 18, 2026
It seems probably the issue was introduced recently:
#142
Can you try to debug locally, modifying the package.json to see what minimal change can fix the issue?
Appreciated if you can fill a PR 🙏
mbtools commentedon Mar 18, 2026
Sorry, I tried but I'm not deep enough into this CJS/ESM topic. My AI didn't help either. 🤷 Feel free to close