In NodeJs development, it is often necessary to install various dependent packages, and sometimes these dependent package versions are updated or changed to another package name, causing npm install to report a warning such as "requires a peer of XXX". The solution is to make up what is missing , the command is as follows:
npm install --save-dev "XXX"
For example, the warning report "requires a peer of eslint@>=6.2.2", as shown in Figure (1):
The warning indicates that the current project lacks eslint@>=6.2.2 dependent packages, just use the npm command to install, as follows:
npm install --save-dev "eslint@>=6.2.2"