[英]You have installed webpack-cli and webpack-command together
When I try running npm run build for a new webpack build I get 当我尝试为新的Webpack构建运行npm run build时,我得到了
You have installed webpack-cli and webpack-command together.
您已经一起安装了webpack-cli和webpack-command。 To work with the "webpack" command you need only one CLI package, please remove one of them or use them directly via their binary.
要使用“ webpack”命令,您只需要一个CLI软件包,请删除其中一个或直接通过其二进制文件使用它们。
I think I installed them globally. 我想我在全球安装了它们。 I tried, deleting them, webpack, deleating node clearing cache but I keep getting the same result.
我尝试过删除,删除webpack,删除节点清除缓存,但我一直得到相同的结果。
Using webpack 4 使用webpack 4
{
"name": "ls",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "webpack"
},
"author": "",
"license": "ISC",
"devDependencies": {
"webpack": "^4.16.5",
"webpack-cli": "^3.1.0"
}
}
我认为消息非常清楚,因此只需运行npm uninstall "webpack-command"
即可删除webpack-command(b / c“ webpack-cli”具有较新的版本)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.