npm Requires a peer but none was installed

I am getting the following warnings but i didn´t figure out how to update them. I also have tried to install the dependencies needed but it does not work.

npm WARN [email protected] requires a peer of ajv@>=5.0.0 but none was installed.
npm WARN [email protected] requires a peer of ionic-angular@^3.4.0 but none was installed.
npm WARN [email protected] requires a peer of @angular/core@^2.0.0 but none was installed.
npm WARN [email protected] requires a peer of @angular/http@^2.0.0 but none was installed.

Could you please help me?

Best regards.

Upvotes: 6

Views: 13030

Answers (4)

J.J
J.J

Reputation: 1011

In my case the library was not installed, so I Google "npm ajv", in the npm web page I when to the Install box and copy the content "npm i ajv", then I open Powershell on the root directory of my Angular project and run the command. This added the library to my project and solved the issue.

Upvotes: 0

Joey Lee
Joey Lee

Reputation: 21

I think it is possible that you did install the dependencies. For me, I get a similar

npm WARN [email protected] requires a peer of react-dom@^15.4.2 but none is installed. You must install peer dependencies yourself.

but I already have react-dom@^16. I believe it is because in your package.json you may have one dependency in devDependencies and the others in dependencies. Note differences in --save-dev and --save.

Upvotes: 0

Tim Biden
Tim Biden

Reputation: 217

Mine was saying:
[email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

Upon searching for Ajv, I realized that ajv 6.0.0 is a release candidate so I added "ajv": "^6.0.1", to the dependencies im my package.json file instead.
I ran npm install. Then I reran my installation script and it eliminated my errors.

Hopefully, it will work for everyone else too.

Upvotes: 8

Chris Skura
Chris Skura

Reputation: 161

depending on what the warning is they might not matter. I would only be concerned if you are having issues with translate. other than that impossible to diagnose without knowing installed component or package.json

Upvotes: 0

Related Questions