DEV Community

Discussion on: Understanding Peer Dependencies

Collapse
 
aroman012 profile image
Alejandro Roman

Hi Ron!

Yes, it's something like that: react-plaid-link has a peer dependency of react 16.8. What's the difference? Well, a dependency means that your project needs a library to work. A peerDependency means that your project will be attached (or plugged in) into another project, and it will be run as part of that project.

Starting from npm 7, peerDependencies are automatically installed together with normal dependencies, but if npm finds a version mismatch (like this case), it will abort the installation.

Your solution would be to either:

  • Downgrade your react version to 16.8, so you comply with react-plaid-link's peer dependency.
  • Ignore the peer dependency (it may break something though) and just continue with react 17. You can do this with npm install react-plaid-link --legacy-peer-deps.
  • Wait until the mantainers of react-plaid-link change the peer dependency so that their library supports react 17.

PD: This question was posted a month ago and, since then, the developers have added support for react 17