解决办法:
- 首先执行下npm adduser,输入相应的Username、Password、Email: (this IS public)
·······Logged in as 您的Username on https://registry.npmjs.org/. -
如果on后面不是https://registry.npmjs.org/,而是其他的镜像,比如我们大家常见的淘宝镜像
······ http://registry.npm.taobao.org/ - 那么首先替换成原来的,替换成原来执行如下命令:
·······npm config set registry https://registry.npmjs.org/ - 最后,替换完毕再执行npm adduser、npm publish