json-viewer: Can't import the named export 'JsonViewer' (imported as 'JsonViewer') from default-exporting module (only default export is available)
issue
- Can’t import the named export ‘JsonViewer’ (imported as ‘JsonViewer’) from default-exporting module (only default export is available)
env
- typescript
- react 17
- webpack 5
sample code
import { JsonViewer } from '@textea/json-viewer'
export function Test({ data }: { data: object }) {
return <JsonViewer value={data} />
}
Why is the error occurring?
About this issue
- Original URL
- State: open
- Created 5 months ago
- Comments: 15
Can you try to update to v3.3.1 and see if it works?
Can you build a minimum reproduction with the same stack (ts, webpack…etc)?
However, the actual project is not nextjs, but the client component method.