Yarn install from gitlab package registry not working with instance-level

Hi,
I facing a curious issue when using Gitlab npm package registry on a private project.

Since I’ve lot of project in the group I want to use instance-level authentication to install package (I don’t want to manually set authToken for each project ID in my .npmrc).

And this work fine with npm, but I’m using yarn for a while in all my project and at this time use yarn add --verbose @myscope/myproject return Request failed "404 Not Found"

This is my .npmrc config :

@pulsar-ai:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=MY_TOKEN

Note that if I add the line //gitlab.com/api/v4/projects/<project-id>/packages/npm/:_authToken=MY_TOKEN in npmrc, it work fine, but I don’t want to put these line for every project I use, although obviously this is not necessary since npm work well without it.

Someone know what’s happen ?
Thanks,
La Gregance

Try with //gitlab.com/api/v4/projects/:_authToken=... according to the docs it should work. (I’m having a different error than before, so I’m not 100% sure if it works or not)

I am facing the same issue !
At a project level, npm and yarn both work nice
But on a group/instance npm works, yarn does not.
Very weird

same here!
tried both
.yarnrc

"@scope:registry" "https://gitlab.com/api/v4/packages/npm/"
"//gitlab.com/api/v4/packages/npm/:_authToken" "${NPM_TOKEN}"

and .yarnrc.yml

npmScopes:
  scope:
    npmRegistryServer: 'https://gitlab.com/api/v4/packages/npm/'
​
npmRegistries:
  //gitlab.com/api/v4/packages/npm/:
    npmAlwaysAuth: true
    npmAuthToken: ${NPM_TOKEN}

yet npm works with .npmrc with same values

I’m having the same issue. Anyone find a solution?