Skip to content

[BUG] Changing NPM version when on 7.23.0 ignores registry option #3758

@yacoman89

Description

@yacoman89

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I use an internal network for development. Because of this, I have a mirror of the npm registry. After I updated npm to version 7.23.0 and attempted to downgrade npm to version 7.22.0 using npm install --global [email protected], I noticed the install would fail because npm was ignoring the registry I specified. This operation was forced to use the default registry https://registry.npmjs.org/npm during one of it's checks.

Expected Behavior

I would expect that if an alternative registry is provided, the npm install checks would use that registry and continue the install process.

Steps To Reproduce

  1. In this environment...
    a. Any OS without an internet connection that uses a mirror of the npm registry on an internal network.
    b. Need to be using npm version 7.23.0.
  2. With this config...
registry = "https://my.awesome.npm.mirror/npm"
  1. Run npm install --global [email protected]
  2. See error...
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://registry.npmjs.org/npm failed, reason getaddrinfo ENOTFOUND registry.npmjs.org
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly.  See: 'npm help config'

Environment

  • OS: Any
  • Node: v12.14.0
  • npm: 7.23.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds review for next stepsRelease 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