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

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


http://www.kler.cn/a/599914.html

相关文章:

  • 文档处理控件Aspose.Words 教程:.NET版中增强的 AI 文档摘要功能
  • Qt窗口控件之浮动窗口QDockWidget
  • 信息系统运行管理员教程2--信息系统运维的组织与管理
  • claude-3-7-sonnet-20250219 支持深度思考,流式输出
  • docker重装环境失败,可能是缓存问题
  • 【赵渝强老师】达梦数据库的物理存储结构
  • React组件复用
  • PTA 1097-矩阵行平移
  • 『 C++ 』原生字符串:让字符串处理更轻松
  • LabVIEW液压振动锤控制系统
  • Pytest的参数化测试
  • 23 种设计模式中的模板模式
  • 穿越之程序员周树人的狂人日记Part3__人机共生纪元
  • 淘宝API关键词接口详解(实战案例)
  • Android 13组合键截屏功能的彻底移除实战
  • IDI_APPLICATION 与 IDC_ARROW资源存放在工程的哪个路径?
  • 基于简单神经网络的线性回归
  • F#语言的游戏优化
  • Stable Diffusion教程:图生图_stable diffusion 图生图
  • vue 事件修饰符