How to fix Npm missing peer dependency

Mond Wan picture Mond Wan · Dec 22, 2016 · Viewed 34.4k times · Source

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?

Answer

Mond Wan picture Mond Wan · Dec 22, 2016

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