webpack-cli requires at least webpack version 4 .
If you are using an older version, such as webpack 2 or 3, you do not need to add the webpack-cli separately. It is already built into older versions of webpack .
In version 4, the entire CLI was ported to a separate webpack-cli .
The fix should be to remove the webpack-cli or use the latest version of webpack>=4 .
There is an ongoing PR about adding webpack 4 as a peer dependency, so a warning about the same will soon appear.
Related discussions: webpack not listed as peer , add webpack 4 as peer dependency
Dhruvdutt jadhav
source share