How can I use this library with NextJS? Always error. #2410
Unanswered
gergomiklos
asked this question in
Q&A
Replies: 1 comment
-
|
Hey @gergomiklos had the same issue last week. I found two ways of making it work, you can either:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I tried many versions from 0.79 to 0.83, but it always broke the app:
Error: require() of ES Module C:\Users\duegr\github\surveysim\my-app\node_modules\d3-color\src\index.js from C:\Users\duegr\github\surveysim\my-app\node_modules@nivo\colors\dist\nivo-colors.cjs.js not supported.
Instead change the require of index.js in C:\Users\duegr\github\surveysim\my-app\node_modules@nivo\colors\dist\nivo-colors.cjs.js to a dynamic import() which is available in all CommonJS modules.
Beta Was this translation helpful? Give feedback.
All reactions