问题:使用 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. 数据库SQL Server 2019安装向导的“功能选择”详细说明(微软官方资料)
  2. Python零碎知识(2):强大的zip
  3. Windows Server 2003 IIS 使用 Excel.Application
  4. 【WebRTC---入门篇】(一)WebRTC整体架构
  5. 安装python扩展库时只能使用pip_安装 Python 扩展库时只能使用 pip 工具在线安装,如果安装不成功就没有别的办法了。_学小易找答案...
  6. 中国基金投顾蓝皮书2022
  7. 关于Tomcat 的一些配置和启动
  8. kong组件_使用Kongzue全家桶组件创建项目全攻略(一、引入和沉浸式的那些事儿)...
  9. 【转】WPF 窗体淡入淡出动画
  10. 【Codeforces Round #508 (Div. 2)】Slime【简单贪心】
  11. 报童问题详细推导及利用Python的SAA方法求解
  12. 计算机英语中级职称题库,职称计算机考试题库(中级职称需要考计算机吗)
  13. 【文献心得】关于内核在不同芯片平台移植的相关整理
  14. verilog 实战 与非门
  15. 金桔蓝牙LoRa主被动一体定位系统原理
  16. 江西省吉安市谷歌高清卫星地图下载
  17. java http 500错误怎么解决_java - HTTP POST请求中出现500内部错误
  18. mysql数据库默认密码在哪看_怎么查看mysql数据库的登录名和密码
  19. Discriminative Feature Learning for Unsupervised Video Summarization(论文翻译)
  20. 怎么将pdf转换成excel

热门文章

  1. 西安交大机器人"走进"秦岭山区小学
  2. 健康美味,茶油炒饭,一口香喷喷,好吃到停不下来。
  3. PHP 获取日期 多少小时后、多少天后、多少周后、多少月后、多少年后
  4. IDENTITY(函数)
  5. Qt插件:QLibrary
  6. 方法:大学生找工作的八大建议...让你不再迷茫
  7. Linux文件系统之排序数据
  8. PANDAS处理英文日期的笨办法
  9. redis执行lua脚本
  10. echarts画布_Echarts绘图用法