verdaccio 发布私人包

1 安装verdaccio(轻量级开源私有npm代理注册表):

npm i verdaccio -g

 

2 启动服务:

verdaccio

 

3 修改config.yaml

参考: https://www.jianshu.com/p/0c905e4a8b70

 

直接替换为:

=======或者你手动修改======

 

在底部加上:

# 监听端口,重点,不配置这个只能本机可以访问

listen: 0.0.0.0:4873

 

修改uplinks为:

# 公有仓库配置

uplinks:

npmjs:

url: https://registry.npmjs.org/

yarn:

url: https://registry.yarnpkg.com/

cnpm:

url: http://r.cnpmjs.org/

taobao:

url: https://registry.npm.taobao.org/

 

4 然后重新起下verdaccio 服务

 

之后你就可以通过本地http://localhost:4873/或者本机ip:4873访问verdaccio 界面了

 

posted @ 2021-01-21 20:19  1点  阅读(296)  评论(0编辑  收藏  举报