Unable to install package from private npm registry

Describe your question in as much detail as possible:
I’ve created a single private project that I’m only using as a centralized, remote NPM package repository. I’m able to publish packages ok. However, when I try to build an app that requires an NPM package as a dependency, npm install is failing. I’ve created an .npmrc file in my repo, and also set a CI env to pass the deploy token that has appropriate permissions on the remote package repository:




  • What are you seeing, and how does it differ from what you expect to see?
    I’m expecting npm install to succeed. Instead, I get an error and the build fails, because it can’t find the package (I’m guessing auth is failing)
    Error: Failed to replace env in config: ${REGISTRY_TOKEN}

  • What version are you on (Hint: /help) ? and are you using self-managed or gitlab.com?
    Gitlab self-managed version 13.7.2-ee (55a11a0db46)

  • What troubleshooting steps have you already taken? Can you link to any docs or other resources so we know where you have been?
    I’ve also tried using CI_JOB_TOKEN, and removing the auth token per this article:
    NPM packages in the Package Registry | GitLab