解决方法:
npm publish --access public
详细参考此处
npm publish gives “unscoped packages cannot be private”
原文:https://www.cnblogs.com/mengff/p/10012693.html