Oner Ksor
Oner Ksor

Reputation: 931

NPM Unmet peer dependency

I have a project with installed [email protected]

Now I want to add this package, but this error appears:

-- UNMET PERR DEPENDENCY react@>=0.12.0 || ^15.0.0-0
npm WARN [email protected] requires a peer of react@>=0.12.0 || ^15.0.0-0
but none was installed

If I understand right, this package has React 0.12-15.0 versions in its peer dependencies, but my project uses higher version and that;s why I can't add this package to my project. So what is possible solution?

Upvotes: 0

Views: 670

Answers (1)

Shubham Khatri
Shubham Khatri

Reputation: 281686

Two are two things that can be done from your side,

You can make use of [email protected] instead of [email protected] in your package.json

Remove the entry for [email protected] and delete the node_modules. After that run the command

npm install

to install [email protected] run command

npm install -S [email protected]

The second thing that you can do is to look for another npm module that is compatible with your version of React.

Upvotes: 2

Related Questions