/Users/bbuser/projects/webpack-demo/node_modules/webpack-cli/bin/cli.js:278
const statsPresetToOptions = require("webpack").Stats.presetToOptions;
^
TypeError: Cannot read property 'presetToOptions' of undefined
webpack-dev-server --open http://localhost:8080/login.html --config webpack.config.js
internal/modules/cjs/loader.js:584
throw err;
^
Error: Cannot find module 'webpack/bin/config-yargs'
webpack学习时,容易直接把代码直接粘过来,但是!!!
及其有可能会发生版本不兼容的问题,所以安装的时候建议命令行安装 npm install XXX