npm config get registry
npm config set <https://registry.npmmirror.com/>
npm config set registry <https://registry.npmjs.org/>
# 安装
npm i nrm -g
# 用法
nrm //展示nrm可用命令
nrm ls //列出已经配置的所有仓库
nrm test //测试所有仓库的响应时间
nrm add <registry> <url> //新增仓库
nrm use <registry> //切换仓库
# nrm更新
先卸载,然后重新安装即可
# 示例
$ nrm ls
npm ---------- <https://registry.npmjs.org/>
yarn --------- <https://registry.yarnpkg.com/>
tencent ------ <https://mirrors.cloud.tencent.com/npm/>
cnpm --------- <https://r.cnpmjs.org/>
taobao ------- <https://registry.npmmirror.com/>
npmMirror ---- <https://skimdb.npmjs.com/registry/>
$ nrm use npm
# 查看配置
npm config list
#修改配置 配置文件在: /Users/h/.npmrc
# 注册
进入https://www.npmjs.com/signup输入用户、密码、邮箱注册
# 如果设置过npm源,需要改为官方源
nrm use npm
# 登录
npm login
# 发布
npm publish
# 取消发布
# 下线模块
npm unpublish xxxx
# 下线某个版本
npm unpublish [email protected]
<https://blog.csdn.net/wjyyhhxit/article/details/109466799>
项目下新建.npmrc文件
registry=http://10.124.131.11:8081/repository/fjspclrmpt-npm/
npm install --productio