npm ERR! code E403
npm ERR! 403 403 Forbidden - PUT https://registry.npmmirror.com/-/user/org.couchdb.user:xxxxxxxx - [FORBIDDEN] Public registration is not allowed
npm ERR! 403 In most cases, you or one of your dependencies are requesting
npm ERR! 403 a package version that is forbidden by your security policy, or
npm ERR! 403 on a server you do not have access to.
npm ERR! A complete log of this run can be found in:
提示内容如上
问题的原因是你的NPM使用了镜像地址.
解决方法是:
全局安装nrm 也就是node的源管理器
安装方法:终端或者CMD中输入
npm install -g nrm
如果发生EACCES mkdir错误,是因为没有使用管理员权限,使用管理员权限的的话命令就是这样的
(我的是mac系统,如果windows系统,使用管理员权限运行cmd)
sudo npm install -g nrm
安装好以后 输入
nrm use npm
切换到npm官方的源地址
记得每次npm publish的时候也都要切换回来.正常安装包的时候可以
nrm use taobao切换到淘宝镜像源