1

有一个服务器,我们在其中配置了全新安装的 verdaccio 来管理 NPM 包的本地缓存。我们需要授予某些特定用户发布包的权限,并为其他用户管理包访问权限。出于发布目的,我们创建了一个团队,将我们的包发布者用户放入该团队,最后授予团队管理员权限。

问题在于创建团队,应该存在组织,并且没有通过命令行创建组织的文档。

尝试以下步骤

npm team create publishers
npm ERR! code EINVALIDTYPE
npm ERR! typeerror Error: Argument #1: Expected string but got null
npm ERR! typeerror at /root/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/libnpmteam/index.js:20:5
npm ERR! typeerror at /root/.nvm/versions/node/v14.3.0/lib/node_modules/npm/node_modules/libnpmteam/index.js:104:5
...
npm ERR! typeerror This is an error with npm itself. Please report this error at:
npm ERR! typeerror <https://npm.community>

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-06-01T04_49_13_414Z-debug.log
npm team create admin:publishers
npm ERR! code E404
npm ERR! 404 Not Found - PUT http://localhost:4873/-/org/admin/team

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-06-01T04_49_04_772Z-debug.log

已阅读的链接:npm 团队- npm org - verdaccio

4

1 回答 1

2

Verdaccio 不支持npmjsnpm team创建的任何组织功能。您可以在https://github.com/verdaccio/verdaccio#compatibility找到您可以使用的命令列表。

如果你想自己支持这些命令,你可以为它创建一个插件中间件。

于 2020-06-01T20:56:10.277 回答