Error: Cannot find module ‘webpack-cli/bin/config-yargs‘
今配置一个webpack-dev-server进行服务端渲染时老是不正确
npm run dev 就崩了
起初的配置为
"devDependencies": { "webpack": "^5.1.3" "webpack-dev-server": "^3.11.0" }
查了些资料都说是 webpack3.x
的版本与webpack-dev-server3.x
的版本不兼容。我就想我改
个"webpack-dev-server": "^2.9.7"
事实证明不行,最后只得把webpack
版本也同着改了才对
"devDependencies": { "webpack": "^3.4.1" "webpack-dev-server": "^2.9.7" }
看来还不能乱配对哟