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@^6.0.0, required by ajv-keywords@3.1.0 #708
Comments
Most likely, the issue title explains the problem. What is the output of |
Hello, I have uploaded the "npm ls" output, please see the a.txt file |
In your output the error is in the chain:
schema-utils@0.4.5 depends on ajv@^6.1.0, I don't know why it was not installed (it's not in the output of Did you try removing everything and re-installing? |
This happened when installing Angular/CLI, if downgrade the following 3 packages, seems to ok |
|
For reference, I think this might be an npm bug - seeing this problem with npm@5.3.0 and npm@3.10.10, but not with npm@5.6.0 or npm@2.15.11. |
EDIT: Sorry must of been in placebo land, still happening. 👎 |
@dputtick Weird, I still get the WARN on npm@5.6.0 and I even updated to npm@5.7.1 and still get it. |
same error for node 8.9.4 and npm 5.7.1 |
Same error for node 9.8.0 and npm 5.7.1 |
... |
This is fixed by adding |
Is the ajv required by every package? Cause I'm using react and everytime I install any package it tell me that ajv-keywords requires ajv to be installed. Annoying!!!!! |
Hello everyone, if you are experiencing this issue (npm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.1.0) after using create-react-app and trying to npm install any package, it is because ajv-keywords has devDependencies and peerDependencies on ajv ^6.0.0, but what is installed (assuming as part of the create-react-app process) is ajv 5.5.2. So "A" way to resolve (work around) is to change those two lines in the ajv-keywords package.json from 6.0.0 to 5.5.2. I did that and now I can npm install any package in my create-react-app . Hope this helps... |
@eholland7080 the correct way to resolve it is to either upgrade ajv to 6.x or downgrade ajv-keywords to 2.x, as otherwise they are not fully compatible (even if they can work in some cases). I wonder what tool has ajv 5.x and ajv-keywords 3.x in its dependencies. Can it be caused by eslint still using 5.x and webpack using 6.x (and ajv-keywords 3.x)? If so, it's definitely npm issue, although can be fixed by upgrading eslint... |
@epoberezkin thank you! how would you recommend as to the best way to upgrade ajv to 6.x? I understand how I would do it if I had installed ajv myself using npm install. not sure how I should do it if ajv was installed automatically by a tool like react-create-app. learning a lot but still a little new so any direction / instructions you can give would be greatly appreciated. thank you... |
@silencieuxle are you still seeing this issue when using react? if you're not, what did you do to fix? |
We suggest that you begin by typing: cd my-app Happy hacking! npm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.1.0 |
See the second part of the answer in eslint/eslint#9856 (comment) According to it it’s an npm bug. |
Found the npm issue: npm/npm#19877 (specifically this comment). Hope this helps! |
@epoberezkin thank you! thats good information there. based on those comments looks like it is a problem with npm 3+ ? so not sure what to do in the interim between now and when the npm folks fix the issue. |
@eholland7080 is it a blocking issue? Can't you just use some command line parameter to ignore the message? I'm not sure npm is going to fix it any time soon... |
@epoberezkin using yarn now and the specific issue above does not occur. |
* Was raising npm ERR! peer dep missing without yarn * ajv-validator/ajv#708
I was having the same issue with Angular 14 (project generated with ng new). |
* add ajv due to npm resolution issues ajv-validator/ajv#708
* add ajv due to npm resolution issues ajv-validator/ajv#708
* add ajv due to npm resolution issues ajv-validator/ajv#708
* add ajv due to npm resolution issues ajv-validator/ajv#708
* add ajv due to npm resolution issues ajv-validator/ajv#708
* add ajv due to npm resolution issues ajv-validator/ajv#708
* add ajv due to npm resolution issues ajv-validator/ajv#708
What version of Ajv are you using? Does the issue happen if you use the latest version?
Ajv options object
JSON Schema
Sample data
Your code
Validation result, data AFTER validation, error messages
What results did you expect?
Are you going to resolve the issue?
a.txt
The text was updated successfully, but these errors were encountered: