使用npm安装webpack报错:npm ERR! Window
2018-04-10 本文已影响0人
积木__
使用npm安装webpack时,遇到如下错误:

可以知道是网络连接有问题,解决方法如下:
1. 关闭npm的https
npm config set strict-ssl false
2. 清除npm的代理命令如下
npm config delete http-proxy
npm config delete https-proxy
3. 把仓库设置为淘宝
npm config set registry "https://registry.npm.taobao.org/"
设置完命令行代理,再安装webpack就成功了。