npm发布包 报错
2020-02-25 本文已影响0人
Kemmy_m
执行命令:npm publish --access public
npm ERR! 403 403 Forbidden - PUT https://registry.npm.taobao.org/@wumei%2fmste-component - [no_perms] Private mode enable, only admin can publish this module

出现原因:使用的是淘宝源cnpm,登陆到的是cnpm
解决方法:切换到npmjs的网址,代码如下:
npm config set registry http://registry.npmjs.org/
解决了,接着有出现这问题,
npm ERR! 401 Unauthorized - PUT http://registry.npmjs.org/@wumei%2fmste-component - You must be logged in to publish packages.
您必须登录才能发布软件包!!

我是没有验证邮箱号码,所以报这个,验证一下就好了。

ok了。