npm config list
例如C:\Users\34002\AppData\Roaming\npm\etc\npmrc
没有npmrc文件则新建一个npmrc文件
email=changeme@yourcompany.com
always-auth=true
_auth=YWRtaW46UXdlIzc4OW5t
4、发布npm包配置(36环境与76环境任选其一)
npm config set registry http://118.24.21.36:9002/repository/npm-hosted/
npm config set registry http://192.168.22.76:9003/repository/npm-group/
npm config set registry https://registry.npmmirror.com
npm config set registry https://registry.npm.taobao.org
npm config set registry https://registry.npmjs.org
推送到内网npm
1、npm config set registry http://192.168.22.76:9003/repository/npm-group/
2、设置publishConfig.registry为http://192.168.22.76:9003/repository/npm-hosted/
3、npm publish
拉取内网npm
1、npm config set registry http://192.168.22.76:9003/repository/npm-group/
2、yarn install
推送到外网npm
1、npm config set registry https://registry.npmjs.org
2、设置publishConfig.registry为https://registry.npmjs.org
3、npm publish
拉取外网npm
1、npm config set registry https://registry.npmjs.org
2、yarn install
#查看镜像地址
npm config get registry