Gitlab redirecting to registry.npmjs.org while trying to download NPM packages using instance-level npm endpoint

Issue:
When trying to install a npm package from the gitlab private repository, It is redirecting to registry.npmjs.org.

Steps to reproduce:
When I deployed an NPM package to the package registry and tried to install the same package by providing the instance-level npm endpoint, I see it is redirecting to registry.npmjs.org and getting a 404 response. But when I use a project-level npm endpoint, I am able to resolve the package.

Screenshot:


npm -version
6.14.13

I am using the SaaS GitLab service.

Any help is greatly appreciated.

Hi, i got exactly the same problem (selfhosted gitlab)

 npm -v 
7.15.1

Gitlab 13.12.0