1、安装
npm install -g verdaccio
2、查看帮助
verdaccio -h
3、运行
```javascript
verdaccio
4、成功后会打印信息
```javascript
info --- Creating default config file in C:\Users\Administrator\AppData\Roaming\verdaccio\config.yaml
warn --- config file - C:\Users\Administrator\AppData\Roaming\verdaccio\config.yaml
warn --- "crypt" algorithm is deprecated consider switch to "bcrypt". Read more: https://github.com/verdaccio/monorepo/pull/580
info --- plugin successfully loaded: verdaccio-htpasswd
info --- plugin successfully loaded: verdaccio-audit
warn --- http address - http://localhost:4873/ - verdaccio/5.15.4
http --- 127.0.0.1 requested 'GET /'
http --- 200, user: null(127.0.0.1), req: 'GET /', bytes: 0/505
http --- 127.0.0.1 requested 'GET /-/verdaccio/data/packages'
http --- 200, user: null(127.0.0.1), req: 'GET /-/verdaccio/data/packages', bytes: 0/2
以上会有 config.yaml
的路径,可进入配置
5、修改配置记得重启 verdaccio
安装 npm i -g nrm
管理npm源
1、查看源
npm i -g nrm
2、添加本地的npm源
nrm add denglianyu http://192.168.111.14:4873
3、查看所有的已添加源
nrm ls
查看以上添加的 denglianyu
源是否存在
4、使用某个源,如:denglianyu
nrm use denglianyu
1、注册
npm addUser
>
Username: root
Password:
Email: (this IS public) 1848659618@qq.com
Logged in as root on http://192.168.111.14:4873/.
2、注册后会自动登录
1、进入需要发布的包,如:
D:project\...\packages\pub-core
2、npm publish