npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

npm ignoring registry setting

What I Wanted to Do

Install packages using only our local private (selectively proxied) registry

What Happened Instead

npm attempts to install some packages from

Reproduction Steps

npm config set registry <our_private_registry_url>

npm install <package with package-lock.json and dependencies “resolved” to the public npmjs registry>


This issue on the previous github appears to be related, so I’m not the only one.

It would appear it’s deciding to used the registry the package was resolved to. That’s not the behavior I want. I want everything to go through our private registry.

Platform Info


Everything does go through your configured registry. resolved is a shortcut that helps optimize installs, but we won’t fetch it from the main registry if you have a different one configured.

We don’t change the entire thing to be different registries because people switch registries sometimes and this could involve a TON of pkglock thrash. If you want to change everything yourself, just do text replacement or regenerate the lockfile :)

My logs say otherwise.

I was able to force it by setting package-lock false