如题:Error: Cannot find module 'webpack-cli/bin/config-yargs'
运行npm run dev: webpack-dev-server --inline,出现报错的话,应该是webpack-dev-server的版本不兼容,最好降版本: npm install webpack-cli@3 --save-dev
"devDependencies": {
"clean-webpack-plugin": "^3.0.0",
"html-webpack-plugin": "^5.2.0",
"webpack": "^5.24.2",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.2"
}