不能从网站或命令行接口重命名组织。

🌐 Organizations cannot be renamed from the website or command line interface.

要重命名一个组织,作为组织所有者,你必须手动将现有的组织成员、团队和软件包迁移到新组织,然后 联系 npm 支持,以便取消发布过时的软件包并删除之前的组织。

🌐 To rename an organization, as an organization owner, you must manually migrate your existing organization members, teams, and packages to a new organization, then contact npm Support to have the outdated packages unpublished and the previous organization deleted.

  1. 使用你想要的名称创建 创建新组织。如果你的旧组织订阅了付费计划,那么新组织也必须选择付费计划。
  2. 将你旧组织的添加成员转到新组织。
  3. 在你的新组织中,创建团队 用于匹配你旧组织中的团队。
  4. 通过在其 package.json 文件中更新包范围以匹配新的组织名称并运行 npm publish,将软件包重新发布到新组织。
  5. 在新组织团队中,配置包访问 以匹配你旧组织中的团队套餐访问权限。
  6. 联系 npm 支持 需要将过时的软件包下架,并删除之前的组织。