编程知识 cdmana.com

Cannot find module 'webpack-cli/bin/config-yargs

webpack5 : 启动 webpack-dev-server 报错 : “Cannot find module 'webpack-cli/bin/config-yargs”

分析原因
webpack,webpack-cli 以及 webpack-dev-server版本不兼容

解决方案: 回退版本,等待官方解决兼容性问题再升级webpack
亲测回退版本有效

"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"

版权声明
本文为[长安城下翩翩少年]所创,转载请带上原文链接,感谢
https://www.cnblogs.com/honkerzh/p/13960603.html

Scroll to Top