Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:npm ERR! peer dep missing: ajv@>=5.0.0, required by ajv-keywords@2.1.0 #5528

Closed
jgfet opened this issue Aug 15, 2017 · 5 comments
Closed

:npm ERR! peer dep missing: ajv@>=5.0.0, required by ajv-keywords@2.1.0 #5528

jgfet opened this issue Aug 15, 2017 · 5 comments

Comments

@jgfet
Copy link

jgfet commented Aug 15, 2017

Do you want to request a feature or report a bug?
report a bug?**

What is the current behavior?

:npm ERR! peer dep missing: ajv@>=5.0.0, required by ajv-keywords@2.1.0
├─┬ @ionic/app-scripts@2.1.3
│ ├─┬ webpack@3.5.4
│ │ ├── acorn@5.1.1
│ │ ├─┬ acorn-dynamic-import@2.0.2
│ │ │ └── acorn@4.0.13
│ │ ├─┬ UNMET PEER DEPENDENCY ajv@5.2.2

If the current behavior is a bug, please provide the steps to reproduce.

What is the expected behavior?
inclusion of ajv in package.json

If this is a feature request, what is motivation or use case for changing the behavior?

Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

ionic info

cli packages: (/opt/IonicProjects/aews_official_rc_1.0.1/node_modules)

    @ionic/cli-utils  : 1.8.1
    ionic (Ionic CLI) : 3.8.1

global packages:

    Cordova CLI : 7.0.1

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : none
    Ionic Framework    : ionic-angular 3.6.0

System:

    Android SDK Tools : 25.2.5
    Node              : v8.2.1
    npm               : 5.3.0
    OS                : macOS Sierra
    Xcode             : Xcode 8.3.3 Build version 8E3004b

Issue seems to have been around in 3.2.0 as well. See here

@sokra
Copy link
Member

sokra commented Aug 16, 2017

webpack has a dependency to ajv:

https://github.com/webpack/webpack/blob/master/package.json#L8-L10

Not sure why this happens...

@TheLarkInn
Copy link
Member

This an upstream issue?

@mbyrne00
Copy link

We've also noticed the same and had to install ajv ad a dev dependency to work around.

@marcbachmann
Copy link

marcbachmann commented Sep 29, 2017

This an upstream issue?

I think so, yes. I just ran into that in a project where I don't use webpack

@alexander-akait
Copy link
Member

NPM bug npm/npm#15708.

In short: you have packages which use difference ajv and on top node_modules/ajv you have old version ajv (example in latest node-sass you have har-validator@2 which use ajv@4 package), but other package use ajv-keywords@2 which require ajv@5 (and on top node_modules/ajv-keywords you have ajv-keywords@2).

Two workaround:

  1. Add to devDependencies ajv@5 package.
  2. Do PR to package and update ajv to latest version.
  3. Avoid using package which use old ajv version.

Eraldo added a commit to Eraldo/coapp2 that referenced this issue Dec 13, 2017
ajv seems to be needed temporarily:
webpack/webpack#5528 (comment)
wimpyprogrammer added a commit to wimpyprogrammer/react-responsive-breakpoints that referenced this issue Dec 29, 2017
Fix sporadic npm installation errors due to an unmet peer dependency on
ajv 5.x.

See webpack/webpack#5528.
jonathanperret added a commit to ut7/nand-together that referenced this issue Sep 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants