Openlibrary: npm WARN [email protected] requires a peer of ajv@^6.9.1 but none is installed

Created on 11 Dec 2020  ·  3Comments  ·  Source: internetarchive/openlibrary

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

npm WARN [email protected] 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

Triage Bug

All 3 comments

@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.

https://github.com/eslint/eslint/pull/9856#issuecomment-377694098

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

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/[email protected]
│ └─┬ @vue/[email protected]
│   └─┬ [email protected]
│     └─┬ [email protected]
│       └── [email protected] 
├─┬ @vue/[email protected]
│ └─┬ [email protected]
│   └─┬ [email protected]
│     └── [email protected] 

... Several dependencies omitted for brevity ...

└─┬ [email protected]
  ├── [email protected] 
  └─┬ [email protected]
    └── UNMET PEER DEPENDENCY [email protected] 

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?

Was this page helpful?
0 / 5 - 0 ratings