question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for React 17 (address NPM warns)

See original GitHub issue

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.

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.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:8

github_iconTop GitHub Comments

10reactions
clarkdcommented, Mar 5, 2021

We are seeing the same issue with npm 7.

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

9reactions
wyzecommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm WARN deprecated tar@2.2.2: This version of tar is no ...
Now your problem of npm WARN deprecated tar@2.2.2: This version of tar is no ... It seems that create-react-app package depends on tar-pack...
Read more >
How to Upgrade to React 18
Updates to Client Rendering APIs. When you first install React 18, you will see a warning in the console: ReactDOM.render is no longer...
Read more >
react-native - npm
A framework for building native apps using React. Latest version: 0.70.6, last published: a month ago. Start using react-native in your ...
Read more >
NPM install error - Material Design for Bootstrap
Delete node_modules folder and package-json.lock · Then run npm i · If problem still exists repeat point 1 and go to 4 point...
Read more >
npm audit fix --force is not fixing any problems : r/reactjs - Reddit
Upgrade to fsevents 2. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found