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@^6.0.0, required by ajv-keywords@3.1.0 #1078

Closed
ghost opened this issue Feb 24, 2018 · 15 comments
Closed

npm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.1.0 #1078

ghost opened this issue Feb 24, 2018 · 15 comments

Comments

@ghost
Copy link

ghost commented Feb 24, 2018

EDIT: WORKAROUND IS TO INSTALL VERSION 10.0.3 npm install standard@10.0.3 -g

Problem occured when: npm install standard -g
Output:

C:\Users\Kevzdev\AppData\Roaming\npm\standard -> C:\Users\Kevzdev\AppData\Roaming\npm\node_modules\standard\bin\cmd.js
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.

+ standard@11.0.0
added 224 packages in 4.381s

C:\Users\Kevzdev\Desktop\jsfolder>

node -v = v9.5.0
npm -v = 5.6.0
Windows 10 Pro x64 v1709

It breaks NPM! When running npm list -g --depth=0 output:

C:\Users\Kevzdev\AppData\Roaming\npm
`-- standard@11.0.0

npm ERR! peer dep missing: ajv@^6.0.0, required by ajv-keywords@3.1.0
@ghost
Copy link
Author

ghost commented Feb 24, 2018

I've checked, npm install standard -g, npm install standard@latest -g and npm install standard@11.0.0 -g all have this issue. Seems to be an issue with standard@11.0.0

workaround is to install version 10.0.3: npm install standard@10.0.3 -g

@ghost
Copy link
Author

ghost commented Feb 24, 2018

Issue persists on both Windows 10 Pro x64 (version 1709) and macOS High Sierra (version 10.13.3) with node versions 8.9.4 (LTS) and 9.5.0 (current) and npm version 5.6.0 (current).

@ghost
Copy link
Author

ghost commented Feb 24, 2018

It's probarely an issue in a dependency: https://www.diffchecker.com/mMdOuh7l (compared 10.0.3 to 11.0.0)

@ghost
Copy link
Author

ghost commented Feb 24, 2018

I've narrowed down the issue to the dependency "eslint": "~4.18.0".
This is a working version "eslint": "~3.19.0" however "eslint-config-standard": "11.0.0" and "eslint-config-standard-jsx": "5.0.0" depends on "eslint": "~4.18.0" so we need to downgrade them aswell to "eslint-config-standard": "10.2.1" and "eslint-config-standard-jsx": "4.0.2" since they depend on "eslint": "~3.19.0".

@ghost ghost mentioned this issue Feb 24, 2018
@ematipico
Copy link
Member

Could you provide a repo to replicate the issue?

@ghost
Copy link
Author

ghost commented Feb 26, 2018

Replicating the issue @ematipico

Remove any standard packages installed
npm uninstall standard -g

This will give an error
npm install standard -g

Remove any standard packages installed
npm uninstall standard -g

This is fine
npm install standard@10.0.3 -g

@bcomnes
Copy link
Member

bcomnes commented Feb 27, 2018

I wonder if this is a windows specific bug, can't reproduce on macOS.

@bcomnes
Copy link
Member

bcomnes commented Feb 27, 2018

Wait, this issue is just about the warning?

@bcomnes
Copy link
Member

bcomnes commented Feb 27, 2018

Never mind seeing that as well.

@ghost
Copy link
Author

ghost commented Feb 27, 2018

@bcomnes both on Windows (10) and macOS (High Sierra).
It's a warning, but it will break standard and other NPM features.

@bcomnes
Copy link
Member

bcomnes commented Feb 27, 2018

eslint/eslint#10022 (comment)

root cause:

npm/npm#19877

You can ignore the warning, its an upstream issue with eslint that they are tracking. Is it actually preventing anything for you?

@bcomnes
Copy link
Member

bcomnes commented Feb 27, 2018

Ah, perhaps shrink-wrap? It sounds like it's an issue with npm itself, and the dep tree mess eslint has created.

@feross
Copy link
Member

feross commented Feb 28, 2018

As @bcomnes says, this is an npm issue npm/npm#19877 that will be worked around when eslint merges https://github.com/eslint/eslint/pull/10022/files and releases a new version.

In the meantime, if this is causing issues for you, I recommend pinning standard to version 10.0.3.

@feross feross closed this as completed Feb 28, 2018
@newtonsheikh
Copy link

I am getting the same error

npm install
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.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.3 (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

Repo: https://github.com/newtonsheikh/vscode-vsts-extension-react

@feross
Copy link
Member

feross commented Mar 8, 2018

@newtonsheikh That repo doesn't use standard.

Locking to avoid further random questions.

@standard standard locked as off-topic and limited conversation to collaborators Mar 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants