问题:使用 npm install 初始化项目依赖失败,报错 'proxy' config is set properly. See: 'npm help config'

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'npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/dengzemiao/.npm/_logs/2022-11-14T04_51_31_564Z-debug.log

1、先查找一下自己的代理

$ npm config get proxy
$ npm config get npm config get https-proxy
$ npm config get registry

2、然后将代理和缓存置空

方式一:

$ npm config set proxy false
$ npm cache clean --force

方式二:

$ npm config set proxy null
$ npm config set https-proxy null

3、配置新的镜像源,选一个就行

# 淘宝源(推荐)
$ npm config set registry http://registry.npm.taobao.org/# 官方源
$ npm config set registry http://registry.npmjs.org/
$ npm config set registry https://registry.npmjs.org/# cnpm 源
$ npm config set registry https://registry.cnpmjs.org/
# 如果使用 cnpm,注意是否安装了 cnpm,cnpm 走推荐走的也是淘宝源
$ npm install -g cnpm --registry=https://registry.npm.taobao.org/

npm install 报错 ‘proxy‘ config is set properly. See: ‘npm help config‘相关推荐

  1. npm install 报错 ERR! gyp ERR! cwd D:\workspace\node_modules\node-sass错误解决/npm ERR! gyp verb `which

    一.问题描述: npm install 报错 ERR! gyp ERR! cwd D:\workspace\node_modules\node-sass 二.可能原因 nodejs与sass版本不匹配 ...

  2. npm install 报错(npm ERR! errno: -4048, npm ERR! code: ‘EPERM‘, npm ERR! syscall: ‘unlink‘,)解决方法

    npm install 报错 npm ERR! errno: -4048, npm ERR! code: 'EPERM', npm ERR! syscall: 'unlink', 用下面的方式测试一下 ...

  3. 关于npm install报错

    我是刚学得vue,现在刚刚下载了node镜像,在最后第二步得时候报错了,npm install报错,说我得packlock.json有问题,我得步骤是这样得 1.全局安装node镜像,npm inst ...

  4. npm install 报错:xx/git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git

    npm install 报错:xx/git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire.git 网上的教程是这样: git c ...

  5. npm install报错C:\Program Files\Git\cmd\git.EXE ls-remote -h -t ssh://git@github.com/sohee-lee7/Squire

    vue-element-admin安装时npm install报错 npm ERR! Error while executing: npm ERR! C:\Program Files\Git\cmd\ ...

  6. npm install 报错:ERR! code EINTEGRITY 解决方案

    npm install 报错:ERR! code EINTEGRITY 解决方案 参考文章: (1)npm install 报错:ERR! code EINTEGRITY 解决方案 (2)https: ...

  7. npm install 报错: WARN checkPermissions Missing write access to 解决方案

    npm install 报错: WARN checkPermissions Missing write access to 解决方案 参考文章: (1)npm install 报错: WARN che ...

  8. npm install 报错 npm WARN tar ENOENT: no such file or directory, open... 解决方式

    报错信息 npm install 报错 npm WARN tar ENOENT: no such file or directory, open- 解决方式 使用cnpm install

  9. npm install报错 npm ERR,code ERESOLVE npm ERR,ERESOLVE unable to resolve dependency tree

    文章目录 前言 问题分析 解决方法 转载于 前言 在下载npm时报错npm ERR! code ERESOLVE npm ERR! ERESOLEVE unable to resolve depend ...

最新文章

  1. mysql自增长2个增加_mysql – 添加第二个自动增量字段并允许重复
  2. HDU 1088 Write a simple HTML Browser
  3. 匹配替换指定文本为html标签
  4. thinkcmfx漏洞太大_ThinkCMF5 代码执行漏洞及后续有关思考
  5. 快速消费品行业的营销费用的管理(2)----营销费用的分类
  6. Boost:bind绑定的unique_ptr测试程序
  7. 耦合式是什么意思_高内聚 ,低耦合 到底是什么意思?
  8. 安卓清理垃圾清理代码_用方面清理代码
  9. uds下载服务流程图_UDS诊断全集,干货分享
  10. nodejs 简单安装环境
  11. python爬虫简历项目怎么写_爬虫项目咋写,爬取什么样的数据可以作为项目写在简历上?...
  12. 网络无法访问互联网是什么原因
  13. 酷睿i7 12700k核显相当于什么显卡 i712700k参数 i7 12700k什么水平
  14. 统计地铁一号线站点Python
  15. u 只读 盘 突然_U盘变成只读,无法格式化,怎么办?
  16. PerfLib 2.0 计数器 removal 失败,退出代码为 2。命令行: C:\Windows\system32\unlodctr.exe /m:hkengperfctr.xml
  17. python多元线性回归实例_利用Python进行数据分析之多元线性回归案例
  18. 同或门(XNOR)电路的网络学习
  19. 关于H1N1的预防,目前为止最好的忠告
  20. 非常OK网独创BSC模式可行性分析

热门文章

  1. 计算机组成原理之CPU的功能和组成
  2. php yii调试,yii框架中debug怎么用
  3. Python数据分析--平民最强宝可梦
  4. TPC-H(二):22个SQL语句说明(基于TPC-H2.17.3版本)
  5. 一个网站完整详细的SEO优化方案(很不错的方案,其实之前也是这么干的,懒得形成书面)
  6. too many open files解决方案
  7. Arduino画圣诞树(精修版)
  8. ERP软件:傻瓜进销存和管家婆哪个好用?
  9. java 千分之一的概率,世界上几十亿人,两个人相遇的概率为千分之一
  10. 位,字,字节 到底是什么?