[NodeJS实战]webpack One CLI for webpack must be installed. These are recommended choices

65 阅读1分钟

场景

安装webpack的时候 遇到的情况; 直接按照提示安装 提示Module webpack-cli 不存在

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. 
- webpack-command (https://github.com/webpack-contrib/webpack-command) 
A lightweight, opinionated webpack CLI. 
We will use “npm” to install the CLI via “npm install -D”. 
Which one do you like to install (webpack-cli/webpack-command):

解决

npm install  webpack-cli -g