"node": "^12.16.3",
"npm": "^6.14.4",
"webpack": "^5.8.0",
"webpack-cli": "^4...",
"webpack-dev-server": "^3.11.0"
之前的版本------------------------- npm run dev 时候报错 Error: Cannot find module 'webpack/bin/config-yargs'
原因是 "webpack-cli": "^4..." 和 "webpack-dev-server": "^3.11.0" 版本不兼容,
解决:降级webpack-cli , npm install webpack-cli@3.3.12
网友评论