首页 > 解决方案 > 如何更新已发布的 npm 包?

问题描述

我最近加入了一个团队并更新了一个已经在 npm 上发布的 react native 插件。现在我想在 npm 上更新包。我已经尝试了该命令 npm publish ,但出现以下错误:

npm ERR! code E404
npm ERR! 404 Not Found - PUT https://registry.npmjs.org/myplugin - Not found
npm ERR! 404
npm ERR! 404  'myplugin@3.5.0' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)
npm ERR! 404
npm ERR! 404 Note that you can also install from a
npm ERR! 404 tarball, folder, http url, or git url.

我使用我的浏览器链接https://registry.npmjs.org/myplugin,它工作正常。我已经在 git 上推送了最新的更新版本,所以在 GitHub 上一切正常。我有一个 npm 帐户,并且我是组织帐户中的管理员。任何关于如何在 npm 上更新包的指导将不胜感激。

标签: npm

解决方案


我刚刚在 npm 中登录了我的帐户,这解决了我的问题。


推荐阅读