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

npm publish出错,‘proxy‘ config is set properly. See: ‘npm help config‘

问题:使用 npm publish发布项目依赖失败,报错 'proxy' config is set properly. See: 'npm help config'

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

npm config get proxy
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/

4、查看镜像使用状态

npm config get registry

http://www.lryc.cn/news/408759.html

相关文章:

  • Springboot 多数据源事务
  • Python每日学习
  • 数据库 执行sql添加删除字段
  • 前端开发:HTML与CSS
  • ctfshow解题方法
  • 探索 Blockly:自定义积木实例
  • MongoDB教程(二十三):关于MongoDB自增机制
  • 展馆导览系统架构解析,从需求分析到上线运维
  • Servlet详解(超详细)
  • Meta AI引入Imagine Me功能,上传图片输入提示词即可实现个性化照片
  • 常用自启设置
  • 模块与组件、模块化与组件化的理解
  • Rust:cargo的常用命令
  • LeetCode 3106.满足距离约束且字典序最小的字符串:模拟(贪心)
  • Elasticsearch 与 MySQL 在查询和插入性能上的深度剖析
  • day4 vue2以及ElementUI
  • 把redis用在Java项目
  • GORM:优雅的Go语言ORM库
  • Golang | Leetcode Golang题解之第279题完全平方数
  • Oracle系统表空间的加解密
  • pytorch backbone
  • uniapp 开发app使用renderjs操作dom
  • 【面试题】MySQL `EXPLAIN`的`Extra`字段:深入解析查询优化的隐藏信息
  • Jenkins持续部署
  • 橙单前端项目下载编译遇到的问题与解决
  • 在android中怎么处理后端返回列表中包含图片id,如何将列表中的图片id转化成url
  • IM聊天代码
  • 【Go - context 速览,场景与用法】
  • Linus: vim编辑器的使用,快捷键及配置等周边知识详解
  • 数仓作业延时告警-基于关键路径预推