question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ajv@^6.0.0 is missing

See original GitHub issue

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

Versions

Angular CLI: 1.6.8
Node: 8.9.4
OS: darwin x64
Angular: 4.4.4
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, tsc-wrapped

@angular/cdk: 2.0.0-beta.12
@angular/cli: 1.6.8
@angular/material: 2.0.0-beta.12
@angular-devkit/build-optimizer: 0.0.42
@angular-devkit/core: 0.0.29
@angular-devkit/schematics: 0.0.52
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.9.8
@schematics/angular: 0.1.17
typescript: 2.3.4
webpack: 3.10.0

Repro steps

  • Step 1

npm i -g @angular/cli

  • Step 2

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

Observed behavior

long@LONG-MBP  ~/Developer/ngx   LONG-jenkins-submodule  npm update @angular/cli
npm WARN ajv-keywords@3.1.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

+ @angular/cli@1.7.0
added 34 packages, removed 139 packages, updated 45 packages and moved 3 packages in 18.928s

Desired behavior

angular installed without any error or warning

Mention any other details that might be useful (optional)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:17 (1 by maintainers)

github_iconTop GitHub Comments

23reactions
timbiltcommented, Feb 21, 2018

I solved this issue by doing the following after running npm i -g @angular/cli:

At this point npm ls -g --depth 0 will have errors in regard to peer dependencies for the ajv package. Let’s go to where the @angular/cli package is installed:

cd $(npm config get prefix)
cd lib/node_modules/@angular/cli

Run this command just for reference:

find . -name 'ajv' -type d

Now for the fix, run this:

npm i ajv@^6.0.0

This will in allow the ajv-keywords package to resolve its peer dependencies AND also patch up any packages in subdirectories that depend on a version of ajv (ie. it installs ajv@5.5.2 for packages that need ajv@~5.5.1 or ajv@^5.0.0 in their respective directories). npm ls -g --depth 0 should be working now without peer dependency errors. To see the results of this patching, run the find command again:

find . -name 'ajv' -type d

To check the versions, run:

find . -name 'ajv' -type d -exec grep '"version":' {}/package.json \;

7reactions
anabellecommented, Feb 21, 2018

I’ve solved it by deleting my package-lock.json and running npm install again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Module not found: Can't resolve '@rjsf/core' when using ...
Trying to run simple example from the documentation, but faceoff the problem with import issue Module not found: Can't resolve '@rjsf/core' ...
Read more >
@rjsf/validator-ajv6 | Yarn - Package Manager
Use @rjsf/validator-ajv6 if you need to validate against invalid schemas. ... Report all schema errors thrown by Ajv. Previously, we would only report...
Read more >
@rjsf/validator-ajv6 - npm Package Health Analysis | Snyk
The npm package @rjsf/validator-ajv6 was scanned for known vulnerabilities and missing license, and no issues were found. Thus the package was deemed as...
Read more >
Jaguar AJ-V6 engine - Wikipedia
The Jaguar AJ-V6 engine is based on the Ford Duratec V6 engine. One notable addition is the use of variable valve timing, a...
Read more >
SPARK PLUG CATALOG - DENSO Global
0.0 1.6. S. 0. R46. 067600-1831. IRE01-27. Rotary Engine. ROTARY ENGINE ... ground electrode is gone, there are the following advantages and disadvantages....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found