当前位置: 首页> 娱乐> 影视 > npm publish出错,‘proxy‘ config is set properly. See: ‘npm help config‘

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

时间:2025/8/7 17:04:17来源:https://blog.csdn.net/qq_42543264/article/details/140668297 浏览次数:0次
问题:使用 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

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

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: