Nivo: Support for React 17 (address NPM warns)

Created on 6 Nov 2020  路  2Comments  路  Source: plouc/nivo

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/[email protected] requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of @nivo/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of @nivo/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of @nivo/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of @nivo/[email protected] but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of react@>= 16.8.4 < 17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN @nivo/[email protected] requires a peer of @nivo/[email protected] but none is installed. You must install peer dependencies yourself.

As well, this dependent library:
npm WARN [email protected] 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.

https://github.com/plouc/nivo/blob/fd731453ed88a31074a8199365e837ad61c90e4c/packages/bar/package.json#L41

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.

bug enhancement

Most helpful comment

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.

All 2 comments

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.

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/[email protected]
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/[email protected]
npm ERR! node_modules/@nivo/tooltip
npm ERR! peer @nivo/tooltip@"0.63.0" from @nivo/[email protected]
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"

Was this page helpful?
5 / 5 - 1 ratings

Related issues

luisrudge picture luisrudge  路  3Comments

cedmax picture cedmax  路  4Comments

p45mark picture p45mark  路  3Comments

barnapisti1994 picture barnapisti1994  路  3Comments

dubzzz picture dubzzz  路  3Comments