npm使用nexus私服

https://blog.51cto.com/u_15707676/5731967
https://blog.csdn.net/humor23/article/details/134206241
设置私服地址,默认是https://registry.npmjs.org/
更改后还原这个为地址为

npm config set registry https://registry.npm.taobao.org/

从官网下载对应的依赖

https://registry.npmmirror.com/binary.html?path=node-sass/v4.14.1/
npm login --registry http://10.0.33.248:8081/repository/npm-hosted/
	
	Username		注册的邮箱 npm@123.com
	Username(xxx)	这个邮箱下的用户名。特指 ID 用户:npm
	Password		密码:npmcl@asdf
	Email			再次输入邮箱:npm@123.com


到本地新增依赖路径(含package.json文件)下开启cmd命令执行以下npm publish 可上传本地依赖
npm publish -registry http://10.0.33.248:8081/repository/npm-hosted/

或者在package.json中配置


{
   
   ...
   "publishConfig": {
   
      "registry":"https://your-nexus-url/repository/npm/"
   }

你可能感兴趣的:(npm,nexus)