为了账号安全,请及时绑定邮箱和手机立即绑定

npm run webpack时 总是提示以下错误 是为什么 求解答

E:\webpack学习\webpack-demo>"node"  "E:\webpack学习\webpack-demo\node_modules\.bin\\..\_webpack@4.43.0@webpack\bin\webpack.js" --config webpack.config.js --progress --display-modules --colors --display-reasons

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):


正在回答

1 回答

知道了,原来需要同步webpack  和webpack-cli的脚手架 不能一个全局安装,一个局部安装,

解决办法:

卸载全局安装的:npm uninstall webpack webpack-cli -g

安装统一的:

npm install webpack webpack-cli -g


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

npm run webpack时 总是提示以下错误 是为什么 求解答

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信