首页 前端知识 执行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

2024-02-24 15:02:23 前端知识 前端哥 14 326 我要收藏

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

npm ERR! code ERR_SOCKET_TIMEOUT
npm ERR! network Socket timeout
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'

npm ERR! A complete 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.com

4. 再次执行安装命令

转载请注明出处或者链接地址:https://www.qianduange.cn//article/2621.html
标签
npm
评论
发布的文章

【jQuery详细介绍】

2024-03-10 11:03:26

jQuery核心函数

2024-03-10 11:03:10

vue echarts GL3d中国地图

2024-03-10 11:03:09

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!