31

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    
├─┬ [email protected]
├─┬ [email protected]
├─┬ [email protected]
│ └── [email protected]
├─┬ [email protected]
├─┬ [email protected]
│ ├─┬ [email protected]
│ ├─┬ [email protected]
├─┬ UNMET PEER DEPENDENCY [email protected]
├─┬ [email protected]
npm ERR! peer dep missing: eslint-plugin-jsx-a11y@^2.2.3, required by [email protected]

As you see, I have installed [email protected] 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
  • 100,619
  • 31
  • 269
  • 393
Mond Wan
  • 1,862
  • 2
  • 17
  • 21
  • 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

29

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
  • 164,888
  • 24
  • 203
  • 252
Mond Wan
  • 1,862
  • 2
  • 17
  • 21