27

I do not know how to fix below peer dependency error.

mondwan@mondwan-All-Series:~/Documents/git/py-cli_build_tools$ sudo npm -g list | grep eslint    
├─┬ babel-eslint@7.1.1
├─┬ eslint@3.12.2
├─┬ eslint-config-airbnb@13.0.0
│ └── eslint-config-airbnb-base@10.0.1
├─┬ eslint-config-eslint@3.0.0
├─┬ eslint-plugin-import@2.2.0
│ ├─┬ eslint-import-resolver-node@0.2.3
│ ├─┬ eslint-module-utils@2.0.0
├─┬ UNMET PEER DEPENDENCY eslint-plugin-jsx-a11y@3.0.2
├─┬ eslint-plugin-react@6.8.0
npm ERR! peer dep missing: eslint-plugin-jsx-a11y@^2.2.3, required by eslint-config-airbnb@13.0.0

As you see, I have installed eslint-plugin-jsx-a11y@3.0.2 which is definitely fulfill ^2.2.3 required by

eslint-config-airbnb. However, it shows such error message. Any idea for solving such problem?

gman
  • 83,286
  • 25
  • 191
  • 301
Mond Wan
  • 1,600
  • 2
  • 14
  • 20
  • Is this the whole log? Some times I have to run `npm install` with `--no-bin-links`, but this just occurs on Windows. the npm call is just like that `npm install --no-bin-links` . I hope it helps – Celso Agra Dec 22 '16 at 03:39
  • Thanks. It is not a full log as they are too long. And I got the answer below. It turns out that I misunderstood the caret symbol. – Mond Wan Dec 22 '16 at 06:02

1 Answers1

27

I have mis-understood the meaning of the ^ in version ^2.2.3.

After reading this link, ^2.2.3 means >=2.2.3 <3.X. That's why npm throws an warning.

Besides, below are links about peer-dependencies

Praveen Kumar Purushothaman
  • 154,660
  • 22
  • 177
  • 226
Mond Wan
  • 1,600
  • 2
  • 14
  • 20