当安装vue-cli时,出现超时错误
- npm ERR! code ECONNRESET
- npm ERR! network aborted
- npm ERR! network This is a problem related to network connectivity.
- npm ERR! network In most cases you are behind a proxy or have bad network settings.
- npm ERR! network
- npm ERR! network If you are behind a proxy, please make sure that the
- npm ERR! network 'proxy' config is set properly. See: 'npm help config';
解决方法如下所示:
- 1.在cmd终端输入以下命令,作用是设置代理
- npm config set proxy=
-
- 2.然后使用淘宝镜像
- npm config set registry https://registry.npm.taobao.org
-
- 3.下载所需要的包
- npm install -g jquery
出现错误原因是:
1.代理设置有问题,没有相关代理的包;
2.重复安装导致网络阻塞;