npm 发布私有库

2020-12-21  本文已影响0人  念雅_a9ef
npm登陆

若是没有账号,请先注册 https://www.npmjs.com/
进入要发布的库的文件夹 cd, 打开终端
输入

npm login

输入 用户名
输入 密码

确定镜像地址是 npm
npm config set registry=http://registry.npmjs.org
初始化库
npm init

输入包名 enter
输入版本 1.0.0(根据实际填写)
输入git 地址(如有填写,如无直接enter)
输入协议 enter
确定 输入yes 或者y

发布
 npm publish
报错
code E403
403 In most cases, you or one of your dependencies are requesting
403 a package version that is forbidden by your security policy.
解决:npm网站确定邮箱地址

登录邮箱确定邮箱地址verify emial dress


确认过邮箱.png
重新 输入
npm publish
发布成功
发布成功.png
上一篇 下一篇

猜你喜欢

热点阅读