npm install --save-dev webpack -g
输入以上命令后: 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. - webpack-command (https://github.com/webpack-contrib/webpack-command)
A lightweight, opinionated webpack CLI.
We will use "yarn" to install the CLI via "yarn add -D".
Which one do you like to install (webpack-cli/webpack-command):
需要安装 webpack-cli:
解决:
npm install --save-dev webpack-cli -g
网友评论