How to fix Npm missing peer dependency

53.9k Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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