执行npm install -g @vue/cli时报错:This is a problem related to network connectivity

执行npm install -g @vue/cli时报错:This is a problem related to network connectivity

执行npm install -g @vue/cli时报错

npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! ***work Socket timeout
npm ERR! ***work This is a problem related to ***work connectivity.
npm ERR! ***work In most cases you are behind a proxy or have bad ***work settings.
npm ERR! ***work
npm ERR! ***work If you are behind a proxy, please make sure that the
npm ERR! ***work 'proxy' config is set properly.  See: 'npm help config'

npm ERR! A ***plete log of this run can be found in:
npm ERR!     D:\app\nodejs\node_cache\_logs\2023-02-27T07_01_05_797Z-debug.log

解决办法:

1. 执行如下命令 代理置为空

npm config set proxy null 

2. 运行如下命令清理缓存

npm cache clean --force

3. 配置npm源

npm config set registry https://registry.npmmirror.***

4. 再次执行安装命令

转载请说明出处内容投诉
CSS教程_站长资源网 » 执行npm install -g @vue/cli时报错:This is a problem related to network connectivity

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买