美文网首页
用verdaccio搭建本地npm私库

用verdaccio搭建本地npm私库

作者: VIAE | 来源:发表于2019-12-24 16:33 被阅读0次

verdaccio:https://github.com/verdaccio/verdaccio
基础环境:
nodejs
npm
win系统需要安装python环境(我是安装的anaconda https://www.anaconda.com/)

默认大家都有基础环境
全局安装verdaccio

npm install verdaccio - g

安装完成之后启动verdaccio
cmd运行

verdaccio 
启动verdaccio.PNG

如果需要更改配置文件的话就根据config file 给出的路径找到config.yaml文件,更改配置
或者根据命令符

npm root -g

就可以找到verdaccio 的本地安装包

npm使用

更换所有npm下载源:npm set registry http://localhost:4873 (默认端口是4873,如果有对端口进行修改,换成你们自己修改的端口就好了)
注册用户:npm adduser –registry http://localhost:4873
登陆:npm login
退出:npm logout
查看当前用户,是否是注册用户:npm who am i

只对本次装包指定下载源:npm install --registry http://localhost:4873

发布:npm publish

撤销发布的包版本:npm unpublish --force
删除发布的包:npm unpublish

相关文章

网友评论

      本文标题:用verdaccio搭建本地npm私库

      本文链接:https://www.haomeiwen.com/subject/kndfoctx.html