当前位置: 首页 > news >正文

npm报错‘proxy‘ config is set properxy. See: ‘npm help config‘

1 报错信息

npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning ETIMEDOUT: request to https://registry.npmjs.org/vue-ref failed, reason: connect ETIMEDOUT 104.16.20.35:443 npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation. npm ERR! code ETIMEDOUT npm ERR! errno ETIMEDOUT npm ERR! network request to https://registry.npmjs.org/dom-closest failed, reason: connect ETIMEDOUT 104.16.22.35:443 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'

2 解决方案

step1 查代理
npm config get proxy
npm config get npm config get https-proxy
npm config get registry

step2 存在代理,缓存置空
npm config set proxy null
npm config set https-proxy null

step3 配置一个镜像源(选一个进行配置)
淘宝源:
npm config set registry http://registry.npm.taobao.org/

官方源:
npm config set registry http://registry.npmjs.org/

华为源
npm config set registry https://mirrors.huaweicloud.com/repository/npm/

其他命令:
npm cache clean
npm rebuild node-sass

相关文章:

  • 【负载均衡系列】HAProxy
  • 蓝桥杯 第十天 :2022 国赛 第 2 题 排列距离/康托定理
  • 20242817李臻《Linux⾼级编程实践》第四周
  • 使用 Python 实现时间序列预测:电力负载需求预测
  • SpringCloud负载均衡:Ribbon核心组件与策略配置
  • 【C++】:异常
  • 如何优化 React 应用性能?
  • Hugo 生成静态网站并部署到 GitHub Pages 的完整流程
  • 深入解析MediaPipe:强大的实时计算机视觉框架
  • 自由学习记录(45)
  • OBOO鸥柏丨广告机终端控制端KylinOS麒麟、统信UOS/鸿蒙国产系统
  • CTF类题目复现总结-[WUSTCTF2020]find_me 1
  • Flutter 快速接入Fair
  • PostgreSQL 数据库中导入大量数据
  • 如何为在线游戏选择合适的游戏盾?
  • .NET8使用EF Core连接SQLite
  • vue3之写一个aichat---已聊天组件部分功能
  • 快速部署Linux + Ollama + AnythingLLM + Deepseek
  • CEF 多进程模式时,注入函数,获得交互信息
  • 关于 2>/dev/null 的作用以及机理
  • 苏州营销网站建设/搜索引擎seo是什么意思
  • 织梦素材网站模板/小红书软文案例
  • 做淘宝优惠卷网站步骤/整合网络营销
  • 网站后期维护协议/seo关键词排名网络公司
  • 闸北区网站建设网页设/汕头网站排名
  • html简单登录页面代码/长春seo推广