Open AnnieTaylorCHEN opened 1 year ago
It seems 0.4.0 will not do since it doesn't support React 18.
This link 100% worked for my install - same issue - wouldn't let me leave feedback at Stack Overflow - Good luck! https://stackoverflow.com/questions/75555873/error-require-of-es-module-in-react-gauge-chart-nextjs?newreg=5251096e281a46a294415af2210f9c55
import dynamic from "next/dynamic"; const GaugeChart = dynamic(() => import('react-gauge-chart'), { ssr: false });
For anyone not using next, what worked for me was utilizing React.lazy for importing the GaugeChart:
const GaugeChart = lazy(() => import("react-gauge-chart"))
Hi, I have other libraries that depend on lower versions of D3 to work, and currently I am having this error in the build:
Which version should I downgrade to avoid this issue? @Martin36 Thanks!