npm access ls-collaborators无法从.npmrc中的自定义注册表读取

时间:2020-08-10 15:04:45

标签: npm gitlab npm-publish

我有一个自定义的.npmrc文件,如下所示

@foo:registry=https://gitlab.com/api/v4/packages/npm/
// This works and it returns the latest dist tag from the registry as configured in .npmrc
npm view --json @foo/my-package dist-tags
// This fails with a 404
npm access ls-collaborators @foo/my-package

// npm ERR! 404 Not Found - GET https://registry.npmjs.org/-/package/%40foo%2Fmy-package/collaborators?format=cli - Package not found

更多上下文: 我正在尝试使用np模块将npm软件包发布到gitlab上的私有软件包注册表中。这些命令似乎是其用户身份验证步骤之一的一部分。

我想念什么?

1 个答案:

答案 0 :(得分:0)

确保"private": true位于package.json文件中。我遇到了与您类似的问题,并为我添加了此问题。

相关问题