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 WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed #4243

Closed
cclauss opened this issue Dec 11, 2020 · 3 comments
Closed
Assignees
Labels
Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed]

Comments

@cclauss
Copy link
Collaborator

cclauss commented Dec 11, 2020

When I do Docker builds, I see the following warning:

npm WARN ajv-keywords@3.4.0 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.

Is this something to worry about? Is it worth fixing?

Evidence / Screenshot (if possible)

Relevant url?

Steps to Reproduce

  1. Go to ...
  2. Do ...
  • Actual:
  • Expected:

Details

  • Logged in (Y/N)?
  • Browser type/version?
  • Operating system?
  • Environment (prod/dev/local)? prod

Proposal & Constraints

Related files

Stakeholders

@cclauss cclauss added Type: Bug Something isn't working. [managed] Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] labels Dec 11, 2020
@Yashs911
Copy link
Contributor

@cclauss this is an npm issue npm/npm#19877

I also hope that the issue with missing peer dependency that a lot of people report to ajv (ajv-validator/ajv#708, ajv-validator/ajv-keywords#56) could go away after this upgrade. Even though it still looks like npm problem to me (or some other tool problem), I don't know what else apart from eslint still uses ajv 5.x to cause this version conflict...

It's an npm 3+ problem at the end of the day, but npm folks have said that they basically would have to rewrite their dependency tree builder to solve this (i.e., they're aware it's a bug but the effort to fix is massive). I'd have to dig up the issue again, though.

eslint/eslint#9856 (comment)

@cclauss
Copy link
Collaborator Author

cclauss commented Dec 11, 2020

That repo is archived (cannot be updated) in favor of https://github.com/npm/cli.

@jimchamp
Copy link
Collaborator

I think that we can overlook this for the time being. Running npm list ajv shows that this warning is related to Webpack's dependencies:

├─┬ @vue/cli@4.2.3
│ └─┬ @vue/cli-shared-utils@4.5.3
│   └─┬ request@2.88.2
│     └─┬ har-validator@5.1.5
│       └── ajv@6.12.3 
├─┬ @vue/cli-plugin-babel@4.5.0
│ └─┬ cache-loader@4.1.0
│   └─┬ schema-utils@2.7.1
│     └── ajv@6.12.5 

... Several dependencies omitted for brevity ...

└─┬ webpack@4.44.2
  ├── ajv@6.12.5 
  └─┬ schema-utils@1.0.0
    └── UNMET PEER DEPENDENCY ajv@6.5.4 

schema-utils is used by webpack to validate options in plugins and loaders, and has nothing to do with Open Library functionality. Since our builds are working properly and we rarely update our webpack configs, we can probably disregard this.

@cdrini does this reasoning seem sound to you?

@cclauss cclauss closed this as completed Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage This issue needs triage. The team needs to decide who should own it, what to do, by when. [managed] Type: Bug Something isn't working. [managed]
Projects
None yet
Development

No branches or pull requests

3 participants