Error: Cannot find module ‘webpack-cli/bin/config-yargs’
该错误的产生与 webpack-dev-server 版本不兼容有关
- 初始版本
- 当执行
cnpm run dev
,报错
- 通过修改 版本可以解决:
cnpm uninstall webpack webpack-cli webpack-dev-server
cnpm install webpack@4.41.0 webpack-cli@3.3.9 webpack-dev-server@3.8.2 --save-dev