Error: Cannot find module ‘webpack-cli/bin/config-yargs’
// package.json{"devDependencies": {"webpack": "^5.2.0","webpack-cli": "^4.1.0","webpack-dev-server": "^3.11.0"}}
参考:Error: Cannot find module ‘webpack-cli/bin/config-yargs’ #1948
If you upgrade webpack to 5. , and webpack cli to 4. , an error will be reported: Error: Cannot find module ‘webpack-cli/bin/config-yargs’ Temporary solution: Back off webpack cli to version 3. * for example:
“webpack-cli”: “^ 3.3.12”
安装 webpack-cli 3. 版本 *npm install webpack-cli@3 -D
