简体   繁体   中英

UNMET PEER DEPENDENCY eslint@2.7.0

I've been having this headache all day today, essentially deploying to aws results in following error:

npm ERR! code EPEERINVALID
npm ERR! peerinvalid The package eslint@2.7.0 does not satisfy its siblings' peerDependencies requirements!

which I believe is cause by npm error, after installing all my packages I get this in console (note this is just a little peace of output related to what I believe causes error, mainly this first line UNMET PEER DEPENDENCY eslint@2.7.0 ):

├─┬ UNMET PEER DEPENDENCY eslint@2.7.0
│ ├─┬ chalk@1.1.3 
│ │ ├── ansi-styles@2.2.1 
│ │ ├── has-ansi@2.0.0 
│ │ └── supports-color@2.0.0 
│ ├─┬ concat-stream@1.5.1 
│ │ ├── inherits@2.0.1 
│ │ ├─┬ readable-stream@2.0.6 
│ │ │ ├── isarray@1.0.0 
│ │ │ ├── process-nextick-args@1.0.6 
│ │ │ └── util-deprecate@1.0.2 
│ │ └── typedarray@0.0.6 
│ ├─┬ doctrine@1.2.1 
│ │ ├── esutils@1.1.6 
│ │ └── isarray@1.0.0 
│ ├─┬ es6-map@0.1.3 
│ │ ├── d@0.1.1 
│ │ ├── es5-ext@0.10.11 
│ │ ├── es6-iterator@2.0.0 
│ │ └── event-emitter@0.3.4 
│ ├─┬ escope@3.6.0 
│ │ ├── es6-weak-map@2.0.1 
│ │ └─┬ esrecurse@4.1.0 
│ │   └── estraverse@4.1.1 
│ ├─┬ espree@3.1.3 
│ │ ├── acorn@3.0.4 
│ │ └─┬ acorn-jsx@2.0.1 
│ │   └── acorn@2.7.0 
│ ├── estraverse@4.2.0 
│ ├── esutils@2.0.2 
│ ├─┬ file-entry-cache@1.2.4 
│ │ └─┬ flat-cache@1.0.10 
│ │   ├─┬ del@2.2.0 
│ │   │ ├─┬ globby@4.0.0 
│ │   │ │ └── glob@6.0.4 
│ │   │ ├── is-path-cwd@1.0.0 
│ │   │ ├─┬ is-path-in-cwd@1.0.0 
│ │   │ │ └── is-path-inside@1.0.0 
│ │   │ └── pify@2.3.0 
│ │   ├── read-json-sync@1.1.1 
│ │   └── write@0.2.1 
│ ├─┬ glob@7.0.3 
│ │ ├─┬ inflight@1.0.4 
│ │ │ └── wrappy@1.0.1 
│ │ └── once@1.3.3 
│ ├── globals@9.4.0 
│ ├── ignore@3.1.1 
│ ├── imurmurhash@0.1.4 
│ ├─┬ inquirer@0.12.0 
│ │ ├── ansi-escapes@1.3.0 
│ │ ├── ansi-regex@2.0.0 
│ │ ├─┬ cli-cursor@1.0.2 
│ │ │ └─┬ restore-cursor@1.0.1 
│ │ │   ├── exit-hook@1.1.1 
│ │ │   └── onetime@1.1.0 
│ │ ├── cli-width@2.1.0 
│ │ ├── figures@1.5.0 
│ │ ├─┬ readline2@1.0.1 
│ │ │ ├── code-point-at@1.0.0 
│ │ │ ├── is-fullwidth-code-point@1.0.0 
│ │ │ └── mute-stream@0.0.5 
│ │ ├── run-async@0.1.0 
│ │ ├── rx-lite@3.1.2 
│ │ ├── string-width@1.0.1 
│ │ └── through@2.3.8 
│ ├─┬ is-my-json-valid@2.13.1 
│ │ ├── generate-function@2.0.0 
│ │ ├─┬ generate-object-property@1.2.0 
│ │ │ └── is-property@1.0.2 
│ │ ├── jsonpointer@2.0.0 
│ │ └── xtend@4.0.1 
│ ├─┬ is-resolvable@1.0.0 
│ │ └── tryit@1.0.2 
│ ├─┬ js-yaml@3.5.5 
│ │ ├─┬ argparse@1.0.7 
│ │ │ └── sprintf-js@1.0.3 
│ │ └── esprima@2.7.2 
│ ├─┬ json-stable-stringify@1.0.1 
│ │ └── jsonify@0.0.0 
│ ├─┬ optionator@0.8.1 
│ │ ├── deep-is@0.1.3 
│ │ ├── fast-levenshtein@1.1.3 
│ │ ├── levn@0.3.0 
│ │ ├── prelude-ls@1.1.2 
│ │ ├── type-check@0.3.2 
│ │ └── wordwrap@1.0.0 
│ ├── path-is-inside@1.0.1 
│ ├── pluralize@1.2.1 
│ ├── progress@1.1.8 
│ ├─┬ require-uncached@1.0.2 
│ │ ├─┬ caller-path@0.1.0 
│ │ │ └── callsites@0.2.0 
│ │ └── resolve-from@1.0.1 
│ ├── shelljs@0.6.0 
│ ├── strip-json-comments@1.0.4 
│ ├─┬ table@3.7.8 
│ │ ├── bluebird@3.3.5 
│ │ ├── slice-ansi@0.0.4 
│ │ ├── tv4@1.2.7 
│ │ └── xregexp@3.1.0 
│ ├── text-table@0.2.0 
│ └─┬ user-home@2.0.0 
│   └── os-homedir@1.0.1 

I was on version 2.5.3 of eslint when I first encountered this error, since I have updated to 2.7.0, but am still seeing this and I have absolutely no idea to what is causing it.

eslint is installed as a devDependency in the following way:

"devDependencies": {
  "eslint": "^2.7.0",
  ...
}

Somewhere in your output you should have a line that looks something like this:

npm WARN EPEERINVALID karma-phantomjs-launcher@0.1.4 requires a peer of karma@>=0.9 but none was installed.

This example is for Karma because I couldn't reproduce your error with ESLint, but the message should read about the same.

For this example, I would need to also:

npm install karma@">=0.9" --save-dev

to satisfy the unmet dependency.


This is probably use to the deprecation of peer dependencies in NPM3. Back in NPM2 it would have just installed the missing dependency for you, but in NPM3 they just warn you and make you deal with it yourself.

If you recently moved to a newer version of Node & NPM then you make have moved from NPM2 to NPM3 which would cause you to start seeing these messages.


Edit:

I think you might also get this message if some other package in your dependencies wants eslint of a different version, not 2.7.0. Like maybe some other package wants eslint@^1.0.0 which isn't satisfied by eslint@^2.7.0 but it is hard to tell without the list of all dependencies.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM