美文网首页
win10系统电脑cmd命令框提示“webpack不是内部指令”

win10系统电脑cmd命令框提示“webpack不是内部指令”

作者: 铲事官 | 来源:发表于2019-01-13 15:26 被阅读0次

    全局安装webpack npm i -g webpack --registry=https://registry.npm.taobao.org
    配置环境变量
    假如webpack.cmd路径是C:\Users\xiaopeng\AppData\Roaming\npm\webpack.cmd
    需要把C:\Users\xiaopeng\AppData\Roaming\npm配置在window环境变量里

     C:\Users\xiaopeng>npm i -g webpack --registry=https://registry.npm.taobao.org
    C:\Users\xiaopeng\AppData\Roaming\npm\webpack -> C:\Users\xiaopeng\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules\webpack\node_modules\fsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
    
    + webpack@4.28.4
    added 321 packages from 278 contributors in 9.279s
    
    C:\Users\xiaopeng>webpack -v
    4.28.4
    

    相关文章

      网友评论

          本文标题:win10系统电脑cmd命令框提示“webpack不是内部指令”

          本文链接:https://www.haomeiwen.com/subject/bdxldqtx.html