Error overriding peer dependency – npm install reactstrap

We Are Going To Discuss About Error overriding peer dependency – npm install reactstrap. So lets Start this Javascript Article.

Error overriding peer dependency – npm install reactstrap

How to solve Error overriding peer dependency – npm install reactstrap

This is because of a change in npm version 7. See the breaking changes section here. You can fix it by using the flag the error tells you to use at the bottom: npm i reactstrap --legacy-peer-deps. If one of your other dependencies already has reactstrap as a peer dependency, you might not need to install it at all (you can check with npm ls reactstrap), due to the change in v7.

Error overriding peer dependency – npm install reactstrap

This is because of a change in npm version 7. See the breaking changes section here. You can fix it by using the flag the error tells you to use at the bottom: npm i reactstrap --legacy-peer-deps. If one of your other dependencies already has reactstrap as a peer dependency, you might not need to install it at all (you can check with npm ls reactstrap), due to the change in v7.

Solution 1

This is because of a change in npm version 7. See the breaking changes section here. You can fix it by using the flag the error tells you to use at the bottom: npm i reactstrap --legacy-peer-deps. If one of your other dependencies already has reactstrap as a peer dependency, you might not need to install it at all (you can check with npm ls reactstrap), due to the change in v7.

Original Author Zac Anger Of This Content

Solution 2

Try something like this in your package.json

  "engines": {
    "npm": ">=8.7.0"
  },
  "overrides": {
    "react": "$react"
  }

This will force react to be the version defined in your "dependencies" for all dependencies (& deps of deps).
You need “recent” npm as it was buggy in some version (I had 8.3.0 and overrides wasn’t working). 8.7.0 seems ok !

See https://docs.npmjs.com/cli/v8/configuring-npm/package-json#overrides

Original Author MoOx Of This Content

Solution 3

To resolve REACT_SPRING installation issue try

npm install  --force

then

npm audit fix --force

Original Author yvan Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment