Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

loadash error on use in server side next.js #141

Closed
rrfaria opened this issue Mar 14, 2022 · 1 comment
Closed

loadash error on use in server side next.js #141

rrfaria opened this issue Mar 14, 2022 · 1 comment

Comments

@rrfaria
Copy link

rrfaria commented Mar 14, 2022

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.
@palerdot
Copy link
Owner

Please refer this issue for how to use ES modules with next.js - #89

This issue and solution has already mentioned as FAQ in README.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants