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

Module not found nivo-arcs.es.js #1674

Closed
juvs opened this issue Jul 9, 2021 · 5 comments · Fixed by #1677
Closed

Module not found nivo-arcs.es.js #1674

juvs opened this issue Jul 9, 2021 · 5 comments · Fixed by #1677
Labels

Comments

@juvs
Copy link

juvs commented Jul 9, 2021

Describe/explain the bug
Module not found, I guess something related with locale?

To Reproduce
Install versión 0.72.0
Use sample pie

Got this error:

./node_modules/@nivo/arcs/dist/nivo-arcs.es.js Module not found: Can't resolve 'react/jsx-runtime' in 'D:\projects\escolastia\colegio-web-ui\node_modules\@nivo\arcs\dist'

@joealden
Copy link

joealden commented Jul 9, 2021

@juvs what version of react are you using?

The Can't resolve 'react/jsx-runtime' part of your error indicates to me that you are using a react version prior to 16.14.0, as this is the earliest version that supports the "new" JSX runtime (see here). The reason you are seeing this error is due to the changes made in #1612. If possible in your context, upgrading to 16.14.0 or higher should resolve the error.

Tagging @wyze on this as this may have been an unforeseen consequence of migrating to the modern JSX runtime. It means that the minimum supported react version for nivo is now technically 16.14.0 (which I personally think is fine), so maybe we should update the peerDependencies ranges for react used in the repo to indicate this (and add a note to the 0.72.0 release notes to highlight this)?

@wyze
Copy link
Contributor

wyze commented Jul 9, 2021

Ah yes, we do need to bump the peer deps. I can add some breaking changes notes to the v0.72.0 changelog/release notes.

@wyze wyze added the bug label Jul 9, 2021
@juvs
Copy link
Author

juvs commented Jul 9, 2021

@juvs what version of react are you using?

The Can't resolve 'react/jsx-runtime' part of your error indicates to me that you are using a react version prior to 16.14.0, as this is the earliest version that supports the "new" JSX runtime (see here). The reason you are seeing this error is due to the changes made in #1612. If possible in your context, upgrading to 16.14.0 or higher should resolve the error.

Tagging @wyze on this as this may have been an unforeseen consequence of migrating to the modern JSX runtime. It means that the minimum supported react version for nivo is now technically 16.14.0 (which I personally think is fine), so maybe we should update the peerDependencies ranges for react used in the repo to indicate this (and add a note to the 0.72.0 release notes to highlight this)?

ver 16.10.2, for now i'm gonna back version 0.62.0 of nivo in order to review the option to update react's version. Thanks!

@iljinjung
Copy link

What version of react is nivo optimized for?

@joealden
Copy link

@iljinjung the minimum supported version is React 16.14.0, but I believe nivo is currently developed against React 17, so I'd say the more recent the React version the better.

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

Successfully merging a pull request may close this issue.

4 participants