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

Support for React 17 (address NPM warns) #1256

Closed
benrhere opened this issue Nov 6, 2020 · 8 comments · Fixed by #1283
Closed

Support for React 17 (address NPM warns) #1256

benrhere opened this issue Nov 6, 2020 · 8 comments · Fixed by #1283

Comments

@benrhere
Copy link

benrhere commented Nov 6, 2020

Is your feature request related to a problem? Please describe.
I'm requesting React 17 support. My package.json contains:

"@nivo/bar": "0.64.0",
"@nivo/pie": "0.64.0",
...
"react": "17.0.1",

I don't know of any actual problems with the library working with React 17, but since updating, when I run npm install I see:

npm WARN @nivo/bar@0.64.0 requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/pie@0.64.0 requires a peer of @nivo/core@0.63.1 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/pie@0.64.0 requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/annotations@0.64.0 requires a peer of @nivo/core@0.63.1 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/annotations@0.64.0 requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/axes@0.64.0 requires a peer of @nivo/core@0.63.1 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/axes@0.64.0 requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/colors@0.64.0 requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/core@0.64.0 requires a peer of @nivo/tooltip@0.63.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/core@0.64.0 requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/legends@0.64.0 requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/tooltip@0.64.0 requires a peer of @nivo/core@0.63.1 but none is installed. You must install peer dependencies yourself.

As well, this dependent library:
npm WARN react-motion@0.5.2 requires a peer of react@^0.14.9 || ^15.3.0 || ^16.0.0 but none is installed. You must install peer dependencies yourself.

^ I don't see any updated versions of that library since react 17's release though.

Describe the solution you'd like
I'd like to suggest that the relevant package.json files be updated to allow the 17.x versions of React.

"react": ">= 16.8.4 < 17.0.0"

Describe alternatives you've considered
The alternative is to leave this as is since it seems still functionally correct and ignore the warning noise on npm install.

Additional context
Just want to say thanks for all the effort that this library has gotten recently.

@wyze
Copy link
Contributor

wyze commented Nov 6, 2020

There shouldn't be any breaking changes for us in React 17, so I don't see an issue with the version ranges being updated.

As far as react-motion, we are working towards migrating away from it in favor of react-spring. You can track progress in #667.

@jmischka
Copy link

jmischka commented Dec 4, 2020

I'm having the same or similar problem. I'm tying to use Nivo in my project and when I npm install @nivo/core I get a dependency tree error message. Is there a way to resolve this issue? My exact error message reads:

code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: @nivo/core@0.66.0
npm ERR! node_modules/@nivo/core
npm ERR! @nivo/core@"" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @nivo/core@"0.62.0" from @nivo/tooltip@0.63.0
npm ERR! node_modules/@nivo/tooltip
npm ERR! peer @nivo/tooltip@"0.63.0" from @nivo/core@0.66.0
npm ERR! node_modules/@nivo/core
npm ERR! @nivo/core@"
" from the root project

If it helps, I'm also using... "react": "^17.0.1"

@farshidinanloo
Copy link

@jmischka
if you are using npm version 7 try to downgrade it to version 6 and try it again.

@nicklasfrahm
Copy link

@farshidinanloo Is this a bug in NPM? If so is there any issue that can be linked here? I am having the exact same issue that @jmischka described, but downgrading NPM is not really an option.

@sbadillo89
Copy link

Hi, this is my error.

20210304_141313

@clarkd
Copy link

clarkd commented Mar 5, 2021

We are seeing the same issue with npm 7.

You can use npm i --legacy-peer-deps to workaround it.

@mircealungu
Copy link

Dear Folks,

Congrats for a nice library :)

I see that the package range has been fixed in #1283.

However, as far as I can see this change did not propagate to npm where the latest available version for nivo is still 0.31.

Is there no way to install the version of nivo with the corrected ranges with npm?

Tahnks!

@wyze
Copy link
Contributor

wyze commented Jul 8, 2021

@mircealungu You need to use the scoped packages, @nivo/core/@nivo/bar, not nivo.

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

Successfully merging a pull request may close this issue.

8 participants