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 https://registry.npmjs.org

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>

Details

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

npm@5.6.0
node@v8.11.4
centos7

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

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.