npm reads settings from several places, so a strange registry or an unexpected default can be hard to trace. One command shows what is in effect and where it came from.
Run it inside the project that misbehaves:
npm config list
The output is split into blocks, each headed by a comment naming the source:
; "project" config from /home/me/app/.npmrc
save-exact = true
You’ll see separate blocks for the project file, your user file, and the global or built-in ones when they set something. That makes it obvious when a forgotten .npmrc in a repository is overriding your own preference. To ask for a single value:
npm config get registry
And to see every setting including the defaults, add -l:
npm config ls -l
That last list is long, so I pipe it through grep or a pager.
Run it from the right folder, because the project file only counts when you’re inside that project. Settings can also come from environment variables that start with npm_config_, which are easy to overlook in a CI job. And glance over the output before pasting it into an issue: registry addresses and internal paths can be things you’d rather not publish.
Further reading: npm config documentation
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more