账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    构建webpack项目,但是提示同时安装了 webpack-cli和webpack-command,并让我卸载其中之一
    27
    0

    问题描述

    执行 npx webpack 的时候他提示我
    You have installed webpack-cli and webpack-command together. 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-command(npm uninstall webpack-command和npm remove webpack-command都试了)但是没有成功。
    我node版本是 v8.11.2
    npm版本是 6.4.1
    webpack版本4.29.6
    webpack-cli版本3.3.0

    相关代码

    // 请把代码文本粘贴到下方(请勿用图片代替代码)
    输入指令: npx webpack
    npx: installed 1 in 3.484s
    Path must be a string. Received undefined
    C:UsersSiirDesktopWebWebPack练习aaanode_moduleswebpackbinwebpack.js
    You have installed webpack-cli and webpack-command together. To work with the "webpack" command you need only one CLI package, please remove one of them or use them directly via their binary.

    你期待的结果是什么?实际看到的错误信息又是什么?

    最后没有成功打包反倒是报了这么个错,到底怎么回事儿

    0
    打赏
    收藏
    点击回答
    您的回答被采纳后将获得:提问者悬赏的 11 元积分
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部