Docs feedback: NPM registry documentation is not clear / wrong

https://docs.gitlab.com/ee/user/packages/npm_registry/index.html

Presets:

  • MacOS 10.14.6
  • npm 6.11.3
  • Gitlab 11.11.8-ee

Problem

I am trying to implement gitlab npm registry publish with a 2FA account.

I am getting each time the 401 error via npm publish.

The API call using the same access token returns an error:

https://gitlab.devenv.mydatamodels.com/api/v4/projects/148/packages/npm/?private_token=<my_token>

{
    "error": "package_id is invalid"
}

I could not find the information about package_id is invalid, though it is very hard to setup the thing. I've spent a day and still could not publish my package.

Details

My project is on a group cloud/agility-hub, e.g.: https://gitlab.devenv.mydatamodels.com/cloud/agility-hub/ web-components.

.npmrc file (tokens are set):

@cloud:registry=https://gitlab.devenv.mydatamodels.com/api/v4/packages/npm/
//gitlab.devenv.mydatamodels.com/api/v4/packages/npm/:_authToken=<my_token>
//gitlab.devenv.mydatamodels.com/api/v4/projects/148/packages/npm/:_authToken=<my_token>

package.json config part:

"name": "@cloud/web-components",
"publishConfig": {
    "@cloud:registry": "https://gitlab.devenv.mydatamodels.com/api/v4/projects/148/packages/npm/"
  }
Assignee Loading
Time tracking Loading