One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
问题:
webpack安装过程出现问题,如下:
PS C:\Users\Administrator\Desktop\Sep\webpack> webpack -v
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages: - webpack-cli (https://github.com/webpack/webpack-cli) The original webpack full-featured CLI. We will use "npm" to install the CLI via "npm install -D". Do you want to install 'webpack-cli' (yes/no): no You need to install 'webpack-cli' to use webpack via CLI. You can also install the CLI manually.
解决方法:
//代码
npm install webpack-cli -g 或者 cnpm install webpack-cli -g
//案例
PS C:\Users\Administrator\Desktop\Sep\webpack> cnpm install webpack-cli -g
完成:
参考链接: