Skip to content

npm install - --registry parameter not respected #3235

@leepowelldev

Description

@leepowelldev

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I have created this repository to demo the issue:
https://github.com/leepowelldev/npm-registry-issue

The scenario is a developer is working on an internal network with a local, non-public registry. They install the popular rimraf package from via local registry, and then deploy to the cloud to build and deploy. Their cloud pipeline task is setup to use the public npm registry.

npm install --registry="https://registry.npmjs.org"

However the install fails as npm keeps trying to access the packages from the internal registry, even though an alternative one was specified.

This works as expected when using npm v6, however fails when using npm v7.

Expected Behavior

npm should transparently use the specific registry as v6 did

Steps To Reproduce

Instructions in repo README

Environment

  • OS: OS X
  • Node: 14
  • npm: 7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingRelease 7.xwork is associated with a specific npm 7 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions