Closed rrfaria closed 2 years ago
I only instaled and used example on next :
<ReactSpeedometer value={777} currentValueText="Happiness Level" customSegmentLabels={[ { text: "Very Bad", position: CustomSegmentLabelPosition.Inside, color: "#555", }, { text: "Bad", position: CustomSegmentLabelPosition.Inside, color: "#555", }, { text: "Ok", position: CustomSegmentLabelPosition.Inside, color: "#555", fontSize: "19px", }, { text: "Good", position: CustomSegmentLabelPosition.Inside, color: "#555", }, { text: "Very Good", position: CustomSegmentLabelPosition.Inside, color: "#555", }, ]} />
And this error appear:
Error: Must use import to load ES Module: node_modules/lodash-es/isNumber.js require() of ES modules is not supported.
Please refer this issue for how to use ES modules with next.js - https://github.com/palerdot/react-d3-speedometer/issues/89
This issue and solution has already mentioned as FAQ in README.
I only instaled and used example on next :
And this error appear: