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

这篇具有很好参考价值的文章主要介绍了npm install 报错 ‘proxy‘ config is set properly. See: ‘npm help config‘。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

问题:使用 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

方式二:文章来源地址https://www.toymoban.com/news/detail-513753.html

$ 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‘的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • git: ‘lfs‘ is not a git command. see ‘git --help‘

    在克隆hugging face里面的项目文件的时候,需要用到git lfs,本文介绍安装git lfs方法 到这个链接里面下载最新的安装包即可 参考链接:https://stackoverflow.com/questions/48734119/git-lfs-is-not-a-git-command-unclear

    2024年02月13日
    浏览(40)
  • git: ‘lfs‘ is not a git command. See ‘git --help‘的解决方案

      大家好,我是爱编程的喵喵。双985硕士毕业,现担任全栈工程师一职,热衷于将数据思维应用到工作与生活中。从事机器学习以及相关的前后端开发工作。曾在阿里云、科大讯飞、CCF等比赛获得多次Top名次。现为CSDN博客专家、人工智能领域优质创作者。喜欢通过博客创作

    2024年02月11日
    浏览(41)
  • git安装后报git: ‘remote-https‘ is not a git command. See ‘git --help‘.

    1. 问题说明     使用的是linux系统,采用编译安装的方式进行安装,安装完成clone项目后提示“git: ‘remote-https’ is not a git command. See ‘git --help’.” 2. 问题解决     需要安装1个额外的库:libcurl4-openssl-dev     安装完成后再将git重新编译安装,然后再Clone项目,搞定!

    2024年02月03日
    浏览(107)
  • 下载node-gyp依赖包报错:gyp ERR! find VS msvs_version not set from command line or npm config

    you need to install the lastest version of version of Visual Studio 你需要下载最新的Visual Studio 找到GitHub地址:https://github.com/nodejs/node-gyp 下载Vistual Studio链接:https://visualstudio.microsoft.com/zh-hans/thank-you-downloading-visual-studio/?sku=BuildTools 不要立刻就去选择c++桌面开发,这样下载的会是Vistual Stu

    2024年02月09日
    浏览(91)
  • 解决npm install 时出现的.git can‘t be found (see https://git.io/Jc3F9)问题

    问题: 今天使用webstream npm instatll 之后报错 .git can‘t be found (see https://git.io/Jc3F9) 原因 一般来说就是你使用ws打开的文件夹位置中不是 .git 文件夹的所在的文件夹相同的位置 举个例子就是: 你的 .git 文件在路径 /a/b 而你现在用ws打开的项目在 /a/b/c 中导致的, 解决方案, 建议不要

    2024年04月25日
    浏览(23)
  • QianBase MPP配置资源组报错cgroup is not properly configured

    在QianBase MPP中希望从默认的资源队列模式修改为资源组模式,通过以下命令设置为资源组模式, qbmconfig -c qb_resource_manager -v “group” 但是却遇到以下报错 根据报错信息判断,可能是因为cgroup未正常配置。根据报错提示查看/sys/fs/cgroup/cpu/qbdb/发现此目录并不存在,因此说明c

    2024年02月11日
    浏览(38)
  • vscode报错解决:npm ERR! Missing script: “dev“ npm ERR! npm ERR! To see a list of scripts, run:

    详细的报错信息如下图所示, 仔细阅读报错信息发现,是因为没有Script脚本\\\"dev\\\"而报错,让你看看script列表然后再运行npm run命令。 打开package.json文件,找到scripts列表,将其中的“server”改为“dev”,如下图所示, 这样再运行npm run dev命令就可以正常运行了。最后,希望能帮

    2024年02月03日
    浏览(39)
  • npm install 提示 “ 1 package is looking for funding“

    执行 npm install 提示 1 package is looking for funding , 执行了 npm fund 重新执行 npm install 仍然出现该提示。该提示不是报错,而是开发者寻求捐赠支持。 可以使用 npm install --no-fund 跳过该提示。 参考文档:https://www.cnblogs.com/sjj33sda/p/13952527.html

    2024年02月11日
    浏览(33)
  • 已配置vue.config.js中的proxy代理,前端本地环境仍然请求后端出现跨域报错

    已配置vue.config.js中的proxy代理,前端本地环境仍然请求后端出现跨域报错 已配置vue.config.js中的proxy代理,前端本地环境仍然请求后端出现跨域报错 控制台仍然出现cors禁止报错,接口调不通 配置proxy代理解决跨域问题的原理是: 前端工程本地环境会启动一个 express 或 koa 的

    2024年02月01日
    浏览(49)
  • npm install 报错

    npm install 报错 解决方案: npm install --legacy-peer-deps 不支持nodejs 18 报错 解决方案: 在package-lock.json文件中修改 在package.json可能需要添加属性 . SET NODE_OPTIONS=–openssl-legacy-provider 直接启动 npm run dev

    2024年02月10日
    浏览(28)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包