# 发布 NPM 包时，遭遇 You should bug the author to publish it (or use the name yourself!) 怎么办?

- Link: https://www.ixiqin.com/2021/08/29/release-npm-packages-you-encounter-should-bug-the-author-to-publish-it-or-use-the-name-yourself-how-to-do/
- Published: 2021-08-29T09:08:30+08:00
- Author: 白宦成

在发布一个 NPM 包时，我遭遇了这样的一个问题：

    ```php
    You should bug the author to publish it (or use the name yourself!)
    Code language: PHP (php)
    ```

经过查询后发现，是因为我之前使用的 Login Token 失效了，在这种情况下，只需要重新执行`
npm adduser`添加用户，即可解决问题。

---

我之前以为是 login 没用，要 adduser 才能使用，后来查询了一下 npm 的文档发现 login
是 adduser 的一个别名，二者功能是一样的，因此，不存在 login 的权限不如 adduser 的
问题。
